X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FInterweave.js;h=3277c742a6ec30b72fec4e5ae4eab5f27341e6e6;hb=4313762da3237b04f204e121a20cab3ba7bb5dd2;hp=973797d64b3f55655fcc88e2588f80b33ba498e5;hpb=e50a802531b99829c533f22ecd21e359e7e1e049;p=vchess.git diff --git a/client/src/variants/Interweave.js b/client/src/variants/Interweave.js index 973797d6..3277c742 100644 --- a/client/src/variants/Interweave.js +++ b/client/src/variants/Interweave.js @@ -3,17 +3,18 @@ import { ArrayFun } from "@/utils/array"; import { randInt, shuffle } from "@/utils/alea"; export class InterweaveRules extends ChessRules { + static get HasFlags() { return false; } - static GenRandInitFen(randomness) { - if (randomness == 0) + static GenRandInitFen(options) { + if (options.randomness == 0) return "rbnkknbr/pppppppp/8/8/8/8/PPPPPPPP/RBNKKNBR w 0 - 000000"; let pieces = { w: new Array(8), b: new Array(8) }; for (let c of ["w", "b"]) { - if (c == 'b' && randomness == 1) { + if (c == 'b' && options.randomness == 1) { pieces['b'] = pieces['w']; break; } @@ -639,4 +640,5 @@ export class InterweaveRules extends ChessRules { if (move.vanish.length >= 2) notation += "X"; return notation; } + };