diff --git a/src/js/Game.js b/src/js/Game.js index a2b0d8c..56df0c9 100644 --- a/src/js/Game.js +++ b/src/js/Game.js @@ -84,13 +84,13 @@ export class Game let board = document.getElementById(this.id); board.innerHTML = ""; - for (let i = 0; i < Game.#height; i++) + for (let y = 0; y < Game.#height; y++) { - for (let j = 0; j < Game.#width; j++) + for (let x = 0; x < Game.#width; x++) { /** @type {Node[]} */ let children = []; - let playerId = this.board[i][j]; + let playerId = this.board[y][x]; if (playerId !== "") { @@ -111,7 +111,7 @@ export class Game field.onclick = () => { - this.board[i][j] = this.state.currentPlayer; + this.board[y][x] = this.state.currentPlayer; this.state.turnCount++; this.draw(); };