X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FColorbound.js;h=7e0a62224c1086821dccb6149e78cf34b76dec62;hb=c3ff3a0c807d97c0311a06491318fe02440266db;hp=b96f73a3814fd4c0761c56441187dfd93474e8c1;hpb=46e8cda8c801fe0e0d5a1ef540da945e05cdf89c;p=vchess.git diff --git a/client/src/variants/Colorbound.js b/client/src/variants/Colorbound.js index b96f73a3..7e0a6222 100644 --- a/client/src/variants/Colorbound.js +++ b/client/src/variants/Colorbound.js @@ -7,7 +7,11 @@ export class ColorboundRules extends ChessRules { return Object.assign( {}, ChessRules.PawnSpecs, - { promotions: V.PIECES } + { + promotions: + ChessRules.PawnSpecs.promotions.concat( + [V.C_ROOK, V.C_KNIGHT, V.C_BISHOP, V.C_QUEEN]) + } ); } @@ -101,7 +105,7 @@ export class ColorboundRules extends ChessRules { static get PIECES() { return ( - ChessRules.PIECES.concat([V.C_ROOK, V.C_KINGHT, V.C_BISHOP, V.C_QUEEN]) + ChessRules.PIECES.concat([V.C_ROOK, V.C_KNIGHT, V.C_BISHOP, V.C_QUEEN]) ); } @@ -311,7 +315,7 @@ export class ColorboundRules extends ChessRules { return ( this.isAttackedBySlideNJump(sq, color, V.C_QUEEN, V.steps[V.BISHOP]) || this.isAttackedBySlideNJump( - sq, color, V.C_ROOK, V.steps[V.KNIGHT], "oneStep") + sq, color, V.C_QUEEN, V.steps[V.KNIGHT], "oneStep") ); } @@ -327,4 +331,8 @@ export class ColorboundRules extends ChessRules { } ); } + + static get SEARCH_DEPTH() { + return 2; + } };