X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=public%2Fjavascripts%2Fvariants%2FMarseille.js;h=1adb83f4642ee28f41c9d4482fe29de8ca550a80;hp=f372698dd7ef638725918a027bafa938098ec9e8;hb=26b8e4f7c71030d49e44fe1d89632ef91b886d67;hpb=c018b304ba439ca92348dcb65715707f5cfcee05 diff --git a/public/javascripts/variants/Marseille.js b/public/javascripts/variants/Marseille.js index f372698d..1adb83f4 100644 --- a/public/javascripts/variants/Marseille.js +++ b/public/javascripts/variants/Marseille.js @@ -117,7 +117,7 @@ class MarseilleRules extends ChessRules }); if (epSqs.length == 0) return moves; - const oppCol = this.getOppCol(color); + const oppCol = V.GetOppCol(color); for (let sq of epSqs) { if (this.subTurn == 1 || (epSqs.length == 2 && @@ -161,9 +161,9 @@ class MarseilleRules extends ChessRules this.epSquares.push([epSq]); } // Does this move give check on subturn 1? If yes, skip subturn 2 - else if (this.subTurn==1 && this.underCheck(this.getOppCol(this.turn))) + else if (this.subTurn==1 && this.underCheck(V.GetOppCol(this.turn))) { - this.turn = this.getOppCol(this.turn); + this.turn = V.GetOppCol(this.turn); this.epSquares.push([epSq]); move.checkOnSubturn1 = true; } @@ -171,7 +171,7 @@ class MarseilleRules extends ChessRules { if (this.subTurn == 2) { - this.turn = this.getOppCol(this.turn); + this.turn = V.GetOppCol(this.turn); let lastEpsq = this.epSquares[this.epSquares.length-1]; lastEpsq.push(epSq); } @@ -196,7 +196,7 @@ class MarseilleRules extends ChessRules } else if (move.checkOnSubturn1) { - this.turn = this.getOppCol(this.turn); + this.turn = V.GetOppCol(this.turn); this.subTurn = 1; this.epSquares.pop(); } @@ -204,7 +204,7 @@ class MarseilleRules extends ChessRules { if (this.subTurn == 1) { - this.turn = this.getOppCol(this.turn); + this.turn = V.GetOppCol(this.turn); let lastEpsq = this.epSquares[this.epSquares.length-1]; lastEpsq.pop(); } @@ -239,7 +239,7 @@ class MarseilleRules extends ChessRules const maxeval = V.INFINITY; const color = this.turn; - const oppCol = this.getOppCol(this.turn); + const oppCol = V.GetOppCol(this.turn); // Search best (half) move for opponent turn const getBestMoveEval = () => {