Some fixes. Screen variant computer play is still broken, seemingly
[vchess.git] / client / src / variants / Shogi.js
index e8b1791..9104ed9 100644 (file)
@@ -16,6 +16,10 @@ export class ShogiRules extends ChessRules {
     return true;
   }
 
+  get showFirstTurn() {
+    return true;
+  }
+
   static get Notoodark() {
     return true;
   }
@@ -308,7 +312,7 @@ export class ShogiRules extends ChessRules {
       case V.LANCE:
         return this.getPotentialLanceMoves([x, y]);
       case V.KING:
-        return this.getPotentialKingMoves([x, y]);
+        return super.getPotentialKingMoves([x, y]);
       case V.P_ROOK:
         return this.getPotentialDragonMoves([x, y]);
       case V.P_BISHOP:
@@ -447,14 +451,6 @@ export class ShogiRules extends ChessRules {
     );
   }
 
-  getPotentialKingMoves(sq) {
-    return this.getSlideNJumpMoves(
-      sq,
-      V.steps[V.ROOK].concat(V.steps[V.BISHOP]),
-      { oneStep: true }
-    );
-  }
-
   isAttacked(sq, color) {
     return (
       this.isAttackedByPawn(sq, color) ||