X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FCrazyhouse.js;h=ec903c2fbdc056c53ced6c352111f3d649bc5c21;hp=179fffa5a91d345173a4e95eac3271c9434aa0c3;hb=0c3fe8a6c3e02af46e0bc646b40c1a0c420f9dcd;hpb=41c80bb63b85b2696d3925c10784c3d7bb5d2aa3 diff --git a/client/src/variants/Crazyhouse.js b/client/src/variants/Crazyhouse.js index 179fffa5..ec903c2f 100644 --- a/client/src/variants/Crazyhouse.js +++ b/client/src/variants/Crazyhouse.js @@ -1,4 +1,7 @@ -class CrazyhouseRules extends ChessRules +import { ChessRules, PiPo, Move } from "@/base_rules"; +import { ArrayFun} from "@/utils/array"; + +export const VariantRules = class CrazyhouseRules extends ChessRules { static IsGoodFen(fen) { @@ -98,7 +101,7 @@ class CrazyhouseRules extends ChessRules [V.QUEEN]: parseInt(fenParsed.reserve[9]), } }; - this.promoted = doubleArray(V.size.x, V.size.y, false); + this.promoted = ArrayFun.init(V.size.x, V.size.y, false); if (fenParsed.promoted != "-") { for (let square of fenParsed.promoted.split(","))