Only allow moves if there is no winner

This commit is contained in:
Manuel Thalmann 2022-12-15 01:13:49 +01:00
parent de2884c16d
commit 05c935d3fa
No known key found for this signature in database
GPG key ID: 5FD9AD3CCDDBD27B

View file

@ -256,6 +256,8 @@ export class Game
* A value indicating whether the chip could be added.
*/
addChip(x, y)
{
if (!this.winner)
{
for (let i = Game.#height - 1; i >= 0; i--)
{
@ -265,6 +267,7 @@ export class Game
return true;
}
}
}
return false;
}