diff --git a/src/js/Game.js b/src/js/Game.js index 1ea794d..d795d81 100644 --- a/src/js/Game.js +++ b/src/js/Game.js @@ -257,12 +257,15 @@ export class Game */ addChip(x, y) { - for (let i = Game.#height - 1; i >= 0; i--) + if (!this.winner) { - if (this.board[i][x] === "") + for (let i = Game.#height - 1; i >= 0; i--) { - this.board[i][x] = this.state.currentPlayer; - return true; + if (this.board[i][x] === "") + { + this.board[i][x] = this.state.currentPlayer; + return true; + } } }