24 lines
439 B
Markdown
Raw Normal View History

2016-05-09 10:32:02 -07:00
# guess the number tutorial
## ~avatar avatar
2016-05-09 10:32:02 -07:00
This tutorial will help you create a guess the number game! Let's get started!
## ~
2016-05-09 10:32:02 -07:00
## Rebuild the game!
2016-05-09 10:32:02 -07:00
The blocks have been shuffled! Put them back together so that...
* when the user presses button ``A``,
* generate a random number
* show the number on screen
```shuffle
input.onButtonPressed(Button.A, () => {
2018-06-01 11:42:38 -07:00
let x = Math.randomRange(0, 10)
2016-05-09 10:32:02 -07:00
basic.showNumber(x)
})
```