X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=variants%2FApocalypse%2Fclass.js;fp=variants%2FApocalypse%2Fclass.js;h=3b735b1ea203ae4176ac244e397ede71a06c3af3;hb=616a8d7ae5ee96fe23d393cf6e4554b2cf3b9245;hp=ace9c4df0a062c6dffcf0f95365b2dcaef76f40e;hpb=ceeac4e82346ffba2d87d763df3cffcddaec912a;p=xogo.git diff --git a/variants/Apocalypse/class.js b/variants/Apocalypse/class.js index ace9c4d..3b735b1 100644 --- a/variants/Apocalypse/class.js +++ b/variants/Apocalypse/class.js @@ -102,7 +102,7 @@ export default class ApocalypseRules extends ChessRules { } } else { - const oppCol = C.GetOppCol(this.getColor(x, y)); + const oppCol = C.GetOppTurn(this.getColor(x, y)); moves = super.getPotentialMovesFrom([x, y]).filter(m => { // Remove pawn push toward own color (absurd) return ( @@ -222,7 +222,7 @@ export default class ApocalypseRules extends ChessRules { if (!res.wm || !res.bm) return; for (let c of ['w', 'b']) { - const myMove = res[c + 'm'], oppMove = res[C.GetOppCol(c) + 'm']; + const myMove = res[c + 'm'], oppMove = res[C.GetOppTurn(c) + 'm']; if ( // More general test than checking moves ends, // because of potential pawn relocation @@ -306,7 +306,7 @@ export default class ApocalypseRules extends ChessRules { }; this.playVisual(revFirstMove); } - this.turn = C.GetOppCol(color); + this.turn = C.GetOppTurn(color); this.movesCount++; this.subTurn = 1; this.firstMove = null;