Fix typo
authorBenjamin Auder <benjamin.auder@somewhere>
Fri, 19 Nov 2021 00:24:05 +0000 (01:24 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Fri, 19 Nov 2021 00:24:05 +0000 (01:24 +0100)
base_rules.js

index 30cb272..5717276 100644 (file)
@@ -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"],