Fix Progressive2. Fixing attempt on Doublemove1
[vchess.git] / client / src / variants / Colorbound.js
index 034f957..7e0a622 100644 (file)
@@ -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;
+  }
 };