X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Fvariants%2FAtomic.js;h=666c50b214406656bc04a258e6f75c448e5a2b75;hb=388e4c401f05b1f6a4c54e33c9da9114969a53c0;hp=0275805f7b3351689941835d7ae755529d917a35;hpb=375ecdd1387e729f85ed114e82253469e4849869;p=vchess.git diff --git a/public/javascripts/variants/Atomic.js b/public/javascripts/variants/Atomic.js index 0275805f..666c50b2 100644 --- a/public/javascripts/variants/Atomic.js +++ b/public/javascripts/variants/Atomic.js @@ -58,7 +58,7 @@ class AtomicRules extends ChessRules updateVariables(move) { super.updateVariables(move); - const color = this.getColor(move.start.x,move.start.y); + const color = move.vanish[0].c; if (move.appear.length == 0) //capture { const firstRank = {"w": 7, "b": 0}; @@ -89,7 +89,7 @@ class AtomicRules extends ChessRules unupdateVariables(move) { super.unupdateVariables(move); - const c = this.getColor(move.start.x,move.start.y); + const c = move.vanish[0].c; const oppCol = this.getOppCol(c); if ([this.kingPos[c][0],this.kingPos[oppCol][0]].some(e => { return e < 0; })) {