@ -161,26 +161,25 @@ Headband Charades Complete Program (simple version - no time limit or scoring):
|
||||
let index = 0
|
||||
let arrayWords: string[] = []
|
||||
input.onGesture(Gesture.ScreenUp, () => {
|
||||
basic.showString(arrayWords[index])
|
||||
basic.showString(arrayWords[index])
|
||||
})
|
||||
input.onGesture(Gesture.ScreenDown, () => {
|
||||
led.stopAnimation()
|
||||
basic.clearScreen()
|
||||
if (index < arrayWords.length - 1) {
|
||||
index += 1
|
||||
} else {
|
||||
game.gameOver()
|
||||
}
|
||||
led.stopAnimation()
|
||||
basic.clearScreen()
|
||||
if (index < arrayWords.length - 1) {
|
||||
index += 1
|
||||
} else {
|
||||
game.gameOver()
|
||||
}
|
||||
})
|
||||
arrayWords = ["cat", "guitar", "flashlight", "cupcake", "tree", "frisbee"]
|
||||
index = 0
|
||||
basic.showLeds(`
|
||||
. # # # .
|
||||
. . . # .
|
||||
. . # # .
|
||||
. . . . .
|
||||
. . # . .
|
||||
`)
|
||||
. # # # .
|
||||
. . . # .
|
||||
. . # # .
|
||||
. . . . .
|
||||
. . # . .`)
|
||||
basic.pause(100)
|
||||
basic.showNumber(3)
|
||||
basic.pause(100)
|
||||
|
Reference in New Issue
Block a user