Add Antiking v1
[vchess.git] / client / src / variants / Suicide.js
index 24e8ef2..4bb5d36 100644 (file)
@@ -7,6 +7,10 @@ export const VariantRules = class SuicideRules extends ChessRules {
     return false;
   }
 
+  static get HasCastle() {
+    return false;
+  }
+
   getPotentialPawnMoves([x, y]) {
     let moves = super.getPotentialPawnMoves([x, y]);
 
@@ -44,15 +48,6 @@ export const VariantRules = class SuicideRules extends ChessRules {
     return moves;
   }
 
-  getPotentialKingMoves(sq) {
-    // No castle:
-    return this.getSlideNJumpMoves(
-      sq,
-      V.steps[V.ROOK].concat(V.steps[V.BISHOP]),
-      "oneStep"
-    );
-  }
-
   // Trim all non-capturing moves (not the most efficient, but easy)
   static KeepCaptures(moves) {
     return moves.filter(m => m.vanish.length == 2);