pxt-calliope/docs/reference/game/is-running.md
Juri Wolf 5f7a8e5301
Updates for V4 (#197)
* update yotta defaults for 16kb devices

* refactor deprecated blocks

* updates for button events

* update button events

* update refference

* update docs

* update docs

* update button event blocks

* update docs

* update block id
2022-08-10 09:36:19 -07:00

28 lines
528 B
Markdown

# is Running
Find out if the game is currently running or not.
```sig
game.isRunning()
```
## Returns
* a [boolean](/types/boolean) value that is `true` if the game is running or `false` if not.
## Example
If the game is currently running, end the game if button **B** is pressed.
```blocks
input.onButtonEvent(Button.B, input.buttonEventClick(), function () {
if (game.isRunning()) {
game.gameOver()
}
})
```
## See also
[is paused](/reference/game/is-paused),
[is game over](/reference/game/is-game-over)