Add a message if someone wins
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
05c935d3fa
commit
8020d30d6b
1 changed files with 3 additions and 1 deletions
|
@ -238,6 +238,8 @@ export class Game
|
||||||
{
|
{
|
||||||
className: this.state.currentPlayer
|
className: this.state.currentPlayer
|
||||||
},
|
},
|
||||||
|
this.winner ?
|
||||||
|
`Player ${Constants.PLAYER_NAMES[this.winner]} wins!` :
|
||||||
`It's player "${Constants.PLAYER_NAMES[this.state.currentPlayer]}"s turn`
|
`It's player "${Constants.PLAYER_NAMES[this.state.currentPlayer]}"s turn`
|
||||||
],
|
],
|
||||||
this.#log);
|
this.#log);
|
||||||
|
|
Loading…
Reference in a new issue