X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=public%2Fjavascripts%2Fvariants%2FAntiking.js;h=45daa62b0d29348f0246f7831a45084ac5d2cf75;hp=ed69ab71cfde392e5e53f07d0666c968b51a87b8;hb=26b8e4f7c71030d49e44fe1d89632ef91b886d67;hpb=c018b304ba439ca92348dcb65715707f5cfcee05 diff --git a/public/javascripts/variants/Antiking.js b/public/javascripts/variants/Antiking.js index ed69ab71..45daa62b 100644 --- a/public/javascripts/variants/Antiking.js +++ b/public/javascripts/variants/Antiking.js @@ -90,7 +90,7 @@ class AntikingRules extends ChessRules underCheck(color) { - const oppCol = this.getOppCol(color); + const oppCol = V.GetOppCol(color); let res = this.isAttacked(this.kingPos[color], [oppCol]) || !this.isAttacked(this.antikingPos[color], [oppCol]); return res; @@ -99,7 +99,7 @@ class AntikingRules extends ChessRules getCheckSquares(color) { let res = super.getCheckSquares(color); - if (!this.isAttacked(this.antikingPos[color], [this.getOppCol(color)])) + if (!this.isAttacked(this.antikingPos[color], [V.GetOppCol(color)])) res.push(JSON.parse(JSON.stringify(this.antikingPos[color]))); return res; } @@ -128,7 +128,7 @@ class AntikingRules extends ChessRules checkGameEnd() { const color = this.turn; - const oppCol = this.getOppCol(color); + const oppCol = V.GetOppCol(color); if (!this.isAttacked(this.kingPos[color], [oppCol]) && this.isAttacked(this.antikingPos[color], [oppCol])) {