X-Git-Url: https://git.auder.net/assets/current/gitweb.css?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FCrazyhouse.js;h=7dc53466b9bc97b1d65c3d36ad9505a796cf79e7;hb=7ba4a5bc5b64e19a1e7f26aa232d5c50770d07ad;hp=89b6f83005d4588d89df7d1bfd291934b3f32fc2;hpb=6808d7a16ec1e761c6a2dffec2281c96953e4d89;p=vchess.git diff --git a/client/src/variants/Crazyhouse.js b/client/src/variants/Crazyhouse.js index 89b6f830..7dc53466 100644 --- a/client/src/variants/Crazyhouse.js +++ b/client/src/variants/Crazyhouse.js @@ -28,8 +28,8 @@ export const VariantRules = class CrazyhouseRules extends ChessRules { }); } - static GenRandInitFen() { - return ChessRules.GenRandInitFen() + " 0000000000 -"; + static GenRandInitFen(randomness) { + return ChessRules.GenRandInitFen(randomness) + " 0000000000 -"; } getFen() { @@ -104,7 +104,7 @@ export const VariantRules = class CrazyhouseRules extends ChessRules { } // Used by the interface: - getReservePpath(color, index) { + getReservePpath(index, color) { return color + V.RESERVE_PIECES[index]; } @@ -208,8 +208,9 @@ export const VariantRules = class CrazyhouseRules extends ChessRules { } static get SEARCH_DEPTH() { + // High branching factor return 2; - } //high branching factor + } evalPosition() { let evaluation = super.evalPosition(); @@ -229,9 +230,4 @@ export const VariantRules = class CrazyhouseRules extends ChessRules { move.appear[0].p != V.PAWN ? move.appear[0].p.toUpperCase() : ""; return piece + "@" + V.CoordsToSquare(move.end); } - - getLongNotation(move) { - if (move.vanish.length > 0) return super.getLongNotation(move); - return "@" + V.CoordsToSquare(move.end); - } };