sq --> [x, y]
authorBenjamin Auder <benjamin.auder@somewhere>
Sat, 11 Apr 2020 19:42:48 +0000 (21:42 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Sat, 11 Apr 2020 19:42:48 +0000 (21:42 +0200)
client/src/variants/Allmate1.js
client/src/variants/Allmate2.js

index d07cf84..f3c0b2e 100644 (file)
@@ -62,7 +62,7 @@ export class Allmate1Rules extends ChessRules {
               case V.KING:
                 // Do not allow castling to escape from check
                 oppMoves = super.getSlideNJumpMoves(
-                  sq,
+                  [x, y],
                   V.steps[V.ROOK].concat(V.steps[V.BISHOP]),
                   "oneStep"
                 );
index 9ba91ef..424bb09 100644 (file)
@@ -63,7 +63,7 @@ export class Allmate2Rules extends ChessRules {
               case V.KING:
                 // Do not allow castling to escape from check
                 oppMoves = super.getSlideNJumpMoves(
-                  sq,
+                  [x, y],
                   V.steps[V.ROOK].concat(V.steps[V.BISHOP]),
                   "oneStep"
                 );