Add a message if someone wins
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

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

View file

@ -238,7 +238,9 @@ export class Game
{ {
className: this.state.currentPlayer className: this.state.currentPlayer
}, },
`It's player "${Constants.PLAYER_NAMES[this.state.currentPlayer]}"s turn` this.winner ?
`Player ${Constants.PLAYER_NAMES[this.winner]} wins!` :
`It's player "${Constants.PLAYER_NAMES[this.state.currentPlayer]}"s turn`
], ],
this.#log); this.#log);
} }