Skip to content

Instantly share code, notes, and snippets.

@mame-n
Created December 19, 2018 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mame-n/24d374bffeed33e81002e39c44212ad7 to your computer and use it in GitHub Desktop.
Save mame-n/24d374bffeed33e81002e39c44212ad7 to your computer and use it in GitHub Desktop.
let グーチョキパー = 0
input.onGesture(Gesture.Shake, () => {
グーチョキパー = Math.random(3)
music.beginMelody(music.builtInMelody(Melodies.BaDing), MelodyOptions.Once)
if (グーチョキパー == 0) {
basic.showLeds(`
. . . . .
. # . # .
# . # . #
# . . . #
. # . # .
`)
} else {
if (グーチョキパー == 1) {
basic.showLeds(`
# # . # #
# # . # #
. # # # .
# . . . #
. # # # .
`)
} else {
basic.showLeds(`
# . # . #
# # # # #
# . # . #
# . . . #
. # . # .
`)
}
}
})
input.onGesture(Gesture.TiltRight, () => {
music.beginMelody(music.builtInMelody(Melodies.Funeral), MelodyOptions.Once)
})
input.onGesture(Gesture.TiltLeft, () => {
music.beginMelody(music.builtInMelody(Melodies.PowerUp), MelodyOptions.Once)
})
basic.forever(() => {
    
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment