X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=variants%2FApocalypse%2Fclass.js;h=3b735b1ea203ae4176ac244e397ede71a06c3af3;hb=c20e2566091a867712d90701b6d069f8de9c3ac1;hp=ace9c4df0a062c6dffcf0f95365b2dcaef76f40e;hpb=9aebe2aac02158a4f1c92ad0ac529f8ed245602e;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;