is Game Over
Find out if the game is over or not.
game.isGameOver()
Returns
- a boolean value that is
trueif the game is over orfalseif not.Example
Be kind and give the player some points for trying.
if (game.isGameOver() && game.score() < 10) {
game.addScore(10 - game.score())
}