X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FCrazyhouse.js;h=24018d14f6246903948a58db45b2c56ac7f67127;hb=a4eca0dccda8c2cb8cc09bb0b3abdfff06214719;hp=89b6f83005d4588d89df7d1bfd291934b3f32fc2;hpb=6808d7a16ec1e761c6a2dffec2281c96953e4d89;p=vchess.git diff --git a/client/src/variants/Crazyhouse.js b/client/src/variants/Crazyhouse.js index 89b6f830..24018d14 100644 --- a/client/src/variants/Crazyhouse.js +++ b/client/src/variants/Crazyhouse.js @@ -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); - } };