X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FBicolour.js;h=c426b811e2c90aeb50d6de2ef66ddcc3518af7b5;hp=795f4ba4b8e730e63597ddd2e2a265d26aabaf8d;hb=4313762da3237b04f204e121a20cab3ba7bb5dd2;hpb=cee75a57d2f4f89c89d64cefbab55d839a238ed9 diff --git a/client/src/variants/Bicolour.js b/client/src/variants/Bicolour.js index 795f4ba4..c426b811 100644 --- a/client/src/variants/Bicolour.js +++ b/client/src/variants/Bicolour.js @@ -14,8 +14,8 @@ export class BicolourRules extends ChessRules { ); } - static GenRandInitFen(randomness) { - if (randomness == 0) + static GenRandInitFen(options) { + if (options.randomness == 0) return "rqbnkbnr/pppppppp/8/8/8/8/PPPPPPPP/RQBNKBNR w 0 -"; // Place pieces at random but the king cannot be next to a rook or queen. @@ -23,7 +23,7 @@ export class BicolourRules extends ChessRules { let pieces = { w: new Array(8), b: new Array(8) }; let flags = ""; for (let c of ["w", "b"]) { - if (c == 'b' && randomness == 1) { + if (c == 'b' && options.randomness == 1) { pieces['b'] = pieces['w']; break; }