X-Git-Url: https://git.auder.net/assets/discord.svg?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FSuction.js;h=aa28f596e394c1bfd8f8c726afd34f4a066a60fb;hb=2c5d7b20742b802d9c47916915c1114bcfc9a9c3;hp=ac3aeb02a537dd57c3251b28861d2ded7c4498a7;hpb=bb688df52df0713aba7b2c1c068614544f5ae96d;p=vchess.git diff --git a/client/src/variants/Suction.js b/client/src/variants/Suction.js index ac3aeb02..aa28f596 100644 --- a/client/src/variants/Suction.js +++ b/client/src/variants/Suction.js @@ -20,9 +20,10 @@ export class SuctionRules extends ChessRules { } static ParseFen(fen) { - return Object.assign({}, ChessRules.ParseFen(fen), { - cmove: fen.split(" ")[4] - }); + return Object.assign( + ChessRules.ParseFen(fen), + { cmove: fen.split(" ")[4] } + ); } static IsGoodFen(fen) { @@ -95,7 +96,7 @@ export class SuctionRules extends ChessRules { Math.abs(epSquare.y - y) == 1 ) { let enpassantMove = this.getBasicMove([x, y], [epSquare.x, epSquare.y]); - const oppCol = V.GetOppCol(color); + const oppCol = V.GetOppCol(this.turn); enpassantMove.vanish.push({ x: x, y: epSquare.y,