X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FTakenmake.js;h=5c0ac08ee9392bd0c74867973fe751558ccbec5f;hb=7e8a7ea1cb66adb4a987badfb0a3c2f99a21bd0a;hp=72268636d7e5309907c1c2ffe3e8c353821488ac;hpb=1d92e1e913d216fa96c12a5dc810fe117c384196;p=vchess.git diff --git a/client/src/variants/Takenmake.js b/client/src/variants/Takenmake.js index 72268636..5c0ac08e 100644 --- a/client/src/variants/Takenmake.js +++ b/client/src/variants/Takenmake.js @@ -2,6 +2,7 @@ import { ChessRules } from "@/base_rules"; import { randInt } from "@/utils/alea"; export class TakenmakeRules extends ChessRules { + setOtherVariables(fen) { super.setOtherVariables(fen); // Stack of "last move" only for intermediate captures @@ -131,7 +132,7 @@ export class TakenmakeRules extends ChessRules { this.kingPos[c][0] = move.appear[0].x; this.kingPos[c][1] = move.appear[0].y; } - super.updateCastleFlags(move, piece); + super.updateCastleFlags(move, piece, c); } undo(move) { @@ -197,4 +198,5 @@ export class TakenmakeRules extends ChessRules { delete moves[mIdx]["next"]; return [moves[mIdx], move2]; } + };