The game library supports simple single-player time-based games. The player has a **sprite**, number of **lives** and a **score**. The game has a sprite, number of **levels** and a **countdown clock**. The general goal of a game will be to move the sprite and achieve a top score before time runs out or the number of lives goes to zero.
## Block Editor
![](/static/mb/game-library/pic0.png)
## KindScript
The code below shows a simple game where the user gets to press the button ``A`` as much times as possible in 10 seconds.
If the `life` reaches zero or the time expires (see countdown), the game enters the **game over** mode. When the game is over, `game->is running` returns false
* check if the game still running.
```
let running = game.isRunning()
```
You can also end the game by calling the `game -> game over` function:
![](/static/mb/game-library/pic0.png)
```
game.gameOver()
```
### Lessons
[game of chance](/microbit/lessons/game-of-chance) | [game counter](/microbit/lessons/game-counter)