X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FCrazyhouse.js;h=fb8c74419b5e45c08844fa0681330b02184cf67a;hp=4f9ff63279b5de7ba076bd5eee43f742ec878958;hb=3a2a7b5fd3c6bfd0752838094c27e1fb6172d109;hpb=afbf3ca7151ef15a9e579b0f913683ab212396c4 diff --git a/client/src/variants/Crazyhouse.js b/client/src/variants/Crazyhouse.js index 4f9ff632..fb8c7441 100644 --- a/client/src/variants/Crazyhouse.js +++ b/client/src/variants/Crazyhouse.js @@ -200,8 +200,8 @@ export const VariantRules = class CrazyhouseRules extends ChessRules { return true; } - updateVariables(move) { - super.updateVariables(move); + postPlay(move) { + super.postPlay(move); if (move.vanish.length == 2 && move.appear.length == 2) return; //skip castle const color = move.appear[0].c; if (move.vanish.length == 0) { @@ -218,8 +218,8 @@ export const VariantRules = class CrazyhouseRules extends ChessRules { else if (move.vanish.length == 2) this.reserve[color][move.vanish[1].p]++; } - unupdateVariables(move) { - super.unupdateVariables(move); + postUndo(move) { + super.postUndo(move); if (move.vanish.length == 2 && move.appear.length == 2) return; const color = this.turn; if (move.vanish.length == 0) {