X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FCrazyhouse.js;fp=client%2Fsrc%2Fvariants%2FCrazyhouse.js;h=2a95dc857b696c5308d996b2631fcc6eedb2f8b4;hp=7fa47b7253fd406d8cf3175c0a21dfab609304a4;hb=ded43c88fad60fd8f9bb46aabd67f3f2092f65f3;hpb=1943de6b9d55716dac4ef8b5672bed803d8d43f9 diff --git a/client/src/variants/Crazyhouse.js b/client/src/variants/Crazyhouse.js index 7fa47b72..2a95dc85 100644 --- a/client/src/variants/Crazyhouse.js +++ b/client/src/variants/Crazyhouse.js @@ -80,9 +80,9 @@ export class CrazyhouseRules extends ChessRules { setOtherVariables(fen) { super.setOtherVariables(fen); + const fenParsed = V.ParseFen(fen); // Also init reserves (used by the interface to show landable pieces) - const reserve = - V.ParseFen(fen).reserve.split("").map(x => parseInt(x, 10)); + const reserve = fenParsed.reserve.split("").map(x => parseInt(x, 10)); this.reserve = { w: { [V.PAWN]: reserve[0],