X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FColorbound.js;h=7e0a62224c1086821dccb6149e78cf34b76dec62;hb=c3ff3a0c807d97c0311a06491318fe02440266db;hp=034f9575b1578b25314845db0086cf2d9fe69872;hpb=801e28709e778bd3a93b014d1f9cb2fb7906e303;p=vchess.git diff --git a/client/src/variants/Colorbound.js b/client/src/variants/Colorbound.js index 034f9575..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]) + } ); } @@ -80,7 +84,7 @@ export class ColorboundRules extends ChessRules { // Add turn + flags + enpassant return ( pieces["b"].join("") + - "/8/pppppppp/8/8/8/PPPPPPPP/" + + "/pppppppp/8/8/8/8/PPPPPPPP/" + pieces["w"].join("").toUpperCase() + " w 0 " + flags + " -" ); @@ -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; + } };