pxt-microbit
Version:
micro:bit target for Microsoft MakeCode (PXT)
25 lines (17 loc) • 443 B
Markdown
Find out if the game is over or not.
```sig
game.isGameOver()
```
* a [boolean](/types/boolean) value that is `true` if the game is over or `false` if not.
Be kind and give the player some points for trying.
```blocks
if (game.isGameOver() && game.score() < 10) {
game.addScore(10 - game.score())
}
```
[](/reference/game/is-running),
[](/reference/game/is-paused)