From e5cea9ca0c427305223cf75b2df6a533e640510f Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Fri, 19 Nov 2021 01:24:05 +0100
Subject: [PATCH] Fix typo

---
 base_rules.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/base_rules.js b/base_rules.js
index 30cb272..5717276 100644
--- a/base_rules.js
+++ b/base_rules.js
@@ -495,8 +495,8 @@ export default class ChessRules {
           let elt = document.getElementById(this.coordsToId([x, y]));
           elt.classList.remove("in-shadow");
           if (this.board[x][y] != "") {
-            const color = this.getColor(i, j);
-            const piece = this.getPiece(i, j);
+            const color = this.getColor(x, y);
+            const piece = this.getPiece(x, y);
             this.g_pieces[x][y] = document.createElement("piece");
             let newClasses = [
               this.pieces()[piece]["class"],
-- 
2.44.0