From: Benjamin Auder Date: Fri, 19 Nov 2021 00:24:05 +0000 (+0100) Subject: Fix typo X-Git-Url: https://git.auder.net/%7B%7B%20asset%28%27mixstore/images/scripts/doc/html/R.css?a=commitdiff_plain;h=e5cea9ca0c427305223cf75b2df6a533e640510f;p=xogo.git Fix typo --- 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"],