Only allow moves if there is no winner
This commit is contained in:
parent
de2884c16d
commit
05c935d3fa
|
@ -256,6 +256,8 @@ export class Game
|
||||||
* A value indicating whether the chip could be added.
|
* A value indicating whether the chip could be added.
|
||||||
*/
|
*/
|
||||||
addChip(x, y)
|
addChip(x, y)
|
||||||
|
{
|
||||||
|
if (!this.winner)
|
||||||
{
|
{
|
||||||
for (let i = Game.#height - 1; i >= 0; i--)
|
for (let i = Game.#height - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
|
@ -265,6 +267,7 @@ export class Game
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue