Fix FenUtil
[xogo.git] / variants / _Antiking / class.js
index 8e2173a..771726c 100644 (file)
@@ -38,7 +38,7 @@ export default class AbstractAntikingRules extends ChessRules {
   }
 
   // NOTE: canTake includes (wrong) captures of antiking,
-  // to not go to low-level using findDestSquares()
+  // to detect attacks on antikings.
   canTake([x1, y1], [x2, y2]) {
     const piece1 = this.getPiece(x1, y1);
     const color1 = this.getColor(x1, y1);
@@ -55,9 +55,9 @@ export default class AbstractAntikingRules extends ChessRules {
       m.vanish.length == 1 || m.vanish[1].p != 'a');
   }
 
-  underCheck(squares, color) {
+  underCheck(square_s, color) {
     let res = false;
-    squares.forEach(sq => {
+    square_s.forEach(sq => {
       switch (this.getPiece(sq[0], sq[1])) {
         case 'k':
           res ||= super.underAttack(sq, color);