Created
December 19, 2018 14:49
-
-
Save mame-n/24d374bffeed33e81002e39c44212ad7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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