Adjust variable names for better understanding
This commit is contained in:
parent
be4956f360
commit
391edbed72
1 changed files with 4 additions and 4 deletions
|
@ -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();
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue