Experimental symmetric randomness + deterministic option
[vchess.git] / client / src / variants / Crazyhouse.js
index 89b6f83..7dc5346 100644 (file)
@@ -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);
-  }
 };