This commit is contained in:
Ron Hale-Evans
2016-05-26 16:52:33 -07:00
91 changed files with 184 additions and 214 deletions

View File

@ -2,8 +2,37 @@
### ~avatar avatar
### @video td/videos/rock-paper-scissors-0
```sim
input.onGesture(Gesture.Shake, () => {
let img = Math.random(3)
if (img == 0) {
basic.showLeds(`
# # # # #
# . . . #
# . . . #
# . . . #
# # # # #
`)
} else if (img == 1) {
basic.showLeds(`
. . . . .
. # # # .
. # # # .
. # # # .
. . . . .
`)
} else {
basic.showLeds(`
# # . . #
# # . # .
. . # . .
# # . # .
# # . . #
`)
}
})
```
In this project, you will build a Rock Paper Scissors game with the BBC micro:bit.
You can play the game with a friend who has it on a micro:bit.
You can also play it with friends who are just using their hands.
@ -135,17 +164,15 @@ input.onGesture(Gesture.Shake, () => {
`)
} else {
basic.showLeds(`
. . . # #
# # . . #
# # . # .
. . # . .
# # . # .
. . . # #
# # . . #
`)
}
})
```
### ~hint