X-Git-Url: https://git.auder.net/doc/screen_pairings_scoring.png?a=blobdiff_plain;f=public%2Fjavascripts%2Fbase_rules.js;h=6bc3591cfc601c3604a4f7c7f7f0619db8c5b553;hb=8a60cacd26d8c47f52ecac26091d6a6f65e6bbc5;hp=e886273698e9a423e2399868b1aa667415bbcddf;hpb=6752407b88b6d7678b9b19df4ffe1224d17625d7;p=vchess.git diff --git a/public/javascripts/base_rules.js b/public/javascripts/base_rules.js index e8862736..6bc3591c 100644 --- a/public/javascripts/base_rules.js +++ b/public/javascripts/base_rules.js @@ -724,6 +724,8 @@ class ChessRules // DEBUG: // if (!this.states) this.states = []; // if (!ingame) this.states.push(JSON.stringify(this.board)); +// if (!this.rstates) this.rstates = []; +// if (!ingame) this.rstates.push(JSON.stringify(this.promoted)+"-"+JSON.stringify(this.reserve)); if (!!ingame) move.notation = [this.getNotation(move), this.getLongNotation(move)]; @@ -745,7 +747,8 @@ class ChessRules // DEBUG: // let state = this.states.pop(); -// if (JSON.stringify(this.board) != state) +// let rstate = this.rstates.pop(); +// if (JSON.stringify(this.board) != state || JSON.stringify(this.promoted)+"-"+JSON.stringify(this.reserve) != rstate) // debugger; }