Fix bug in Allmate2
[vchess.git] / client / src / variants / Allmate2.js
index 9b60a5f..259faa7 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(
-                  [x, y],
+                  [i, j],
                   V.steps[V.ROOK].concat(V.steps[V.BISHOP]),
                   "oneStep"
                 );