Fix bug in Allmate2
authorBenjamin Auder <benjamin.auder@somewhere>
Sat, 25 Jul 2020 09:41:58 +0000 (11:41 +0200)
committerBenjamin Auder <benjamin.auder@somewhere>
Sat, 25 Jul 2020 09:41:58 +0000 (11:41 +0200)
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"
                 );