From 0cef7bb4f72046ce60db408bfb76103428e2c15a Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Sat, 22 Oct 2022 08:26:12 +0200
Subject: [PATCH] Fix FenUtil

---
 utils/setupPieces.js        | 8 ++++----
 variants/_Antiking/class.js | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/utils/setupPieces.js b/utils/setupPieces.js
index 7cd6779..11af74a 100644
--- a/utils/setupPieces.js
+++ b/utils/setupPieces.js
@@ -1,10 +1,10 @@
 import {Random} from "/utils/alea.js";
 
-export class FenUtil = {
+export const FenUtil = {
 
   // arg o (constraints): "between" with p1 and p2.
   //                      "flags", "diffCol": array of pieceType
-  setupRow(arr, o) {
+  setupRow: function(arr, o) {
     let res = JSON.parse(JSON.stringify(arr));
     if (o.randomness >= 1)
       res = Random.shuffle(arr);
@@ -51,9 +51,9 @@ export class FenUtil = {
       }
     }
     return {fen: res, flags: flags};
-  }
+  },
 
-  setupPieces(arr, o) {
+  setupPieces: function(arr, o) {
     const row1 = FenUtil.setupRow(arr, o);
     const row2 = o.randomness == 2 ? FenUtil.setupRow(arr, o) : row1;
     return {
diff --git a/variants/_Antiking/class.js b/variants/_Antiking/class.js
index ac9aedc..771726c 100644
--- a/variants/_Antiking/class.js
+++ b/variants/_Antiking/class.js
@@ -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);
-- 
2.44.0