From 8991091a167e28cb0de4c98a11cf8cf5e27a1956 Mon Sep 17 00:00:00 2001 From: CFIT Corporation <80238089+CFITCorporation@users.noreply.github.com> Date: Sun, 13 Feb 2022 11:30:21 +0800 Subject: [PATCH] Update play.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决残局悔棋键bug --- js/play.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/play.js b/js/play.js index 36706a1..b0cdc0d 100644 --- a/js/play.js +++ b/js/play.js @@ -1,7 +1,7 @@ /*! 一叶孤舟 | qq:28701884 | 欢迎指教 */ var play = play||{}; - +var mapcopy; play.init = function (depth, map){ var map = map || com.initMap; var depth = depth || 3 @@ -11,7 +11,7 @@ play.init = function (depth, map){ play.nowManKey = false; //现在要操作的棋子 play.pace = []; //记录每一步 play.isPlay = true ; //是否能走棋 - + mapcopy=map; play.bylaw = com.bylaw; play.show = com.show; play.showPane = com.showPane; @@ -95,7 +95,8 @@ play.init = function (depth, map){ //悔棋 play.regret = function (){ - var map = com.arr2Clone(com.initMap); + var map = com.arr2Clone(mapcopy); + //var map = com.arr2Clone(com.initMap);//此处为bug,未兼容残局 //初始化所有棋子 for (var i=0; i