remove "to create new script..."

This commit is contained in:
Peli de Halleux
2016-04-13 08:48:42 -07:00
parent d28efb3b84
commit 18e637aa28
29 changed files with 13 additions and 83 deletions

View File

@ -10,18 +10,16 @@ Welcome! This tutorial will help you create a game of rock paper scissors with t
### ~
To create a new script, go to the [Create Code](/create-code) page and tap *New Project* under **Touch Develop**.
We want the BBC micro:bit to choose rock, paper, or scissors when it is shaken. Let's begin by creating an `input->on shake` condition so the micro:bit will run code when it is shaken.
```
```blocks
input.onGesture(Gesture.Shake, () => {
})
```
Next, create an image that contains 3 frames: rock, paper, and scissors. We will control which image is shown with `offset`.
```
```blocks
input.onGesture(Gesture.Shake, () => {
let img = images.createImage(`
. . . . . # # # # # . . . . #
@ -35,7 +33,7 @@ input.onGesture(Gesture.Shake, () => {
The BBC micro:bit will look like it's showing 1 frame of the image by displaying the whole image with plot frame and math random. We can help the BBC micro:bit randomly decide which offset to using plot image by math random. The BBC micro:bit will randomly pick the image to display with plot image and the `math->random(3)` function.
```
```blocks
input.onGesture(Gesture.Shake, () => {
let img1 = images.createImage(`
. . . . . # # # # # . . . . #