X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FCircular.js;h=df8d95456230da5d57da09ab9722f76945f59371;hb=b83a675a3066c67cc7843ae27ad8aeffd15b0976;hp=9ec597bda7f3d4561e104f11b48769c2d70a34dd;hpb=0ba6420d3515e278b34c29e5afa1e58f6e08e9eb;p=vchess.git diff --git a/client/src/variants/Circular.js b/client/src/variants/Circular.js index 9ec597bd..df8d9545 100644 --- a/client/src/variants/Circular.js +++ b/client/src/variants/Circular.js @@ -30,10 +30,18 @@ export const VariantRules = class CircularRules extends ChessRules { this.pawnFlags = flags; } - static GenRandInitFen() { + static GenRandInitFen(randomness) { + if (randomness == 0) + return "8/8/pppppppp/rnbqkbnr/8/8/PPPPPPPP/RNBQKBNR w 0 1111111111111111"; + let pieces = { w: new Array(8), b: new Array(8) }; // Shuffle pieces on first and fifth rank for (let c of ["w", "b"]) { + if (c == 'b' && randomness == 1) { + pieces['b'] = pieces['w']; + break; + } + let positions = ArrayFun.range(8); // Get random squares for bishops @@ -238,4 +246,8 @@ export const VariantRules = class CircularRules extends ChessRules { k: 1000 }; } + + static get SEARCH_DEPTH() { + return 2; + } };