ㄴㅇㄹㄴㄱㅇㅋㅁ
본문
from microbit import *
import radio
import audio
import random
radio.config(group=17)
radio.on()
timer = -1
myTurn = False
while True:
if button_a.was_pressed() and button_b.was_pressed():
display.show("3")
sleep(500)
display.show("2")
sleep(500)
display.show("1")
sleep(500)
display.clear()
myTurn = True
timer = random.randint(5,30)
if accelerometer.was_gesture('shake'):
radio.send(str(timer))
myTurn = False
display.clear()
audio.play(Sound.GIGGLE)
if myTurn:
if timer > 0:
sleep(1000)
timer = timer - 1
display.show(Image.SKULL)
print(timer)
else :
audio.play(Sound.SOARING, wait=False)
display.scroll("Loser")
message = radio.receive()
if message :
timer = int(message)
myTurn=True
import radio
import audio
import random
radio.config(group=17)
radio.on()
timer = -1
myTurn = False
while True:
if button_a.was_pressed() and button_b.was_pressed():
display.show("3")
sleep(500)
display.show("2")
sleep(500)
display.show("1")
sleep(500)
display.clear()
myTurn = True
timer = random.randint(5,30)
if accelerometer.was_gesture('shake'):
radio.send(str(timer))
myTurn = False
display.clear()
audio.play(Sound.GIGGLE)
if myTurn:
if timer > 0:
sleep(1000)
timer = timer - 1
display.show(Image.SKULL)
print(timer)
else :
audio.play(Sound.SOARING, wait=False)
display.scroll("Loser")
message = radio.receive()
if message :
timer = int(message)
myTurn=True
좋아요39
이 글을 좋아요하셨습니다
카테고리 분류 학습 시스템 (총 0개 학습됨)
예측 카테고리:
게임
(랜덤 - 학습 데이터 없음)
이 분류가 맞나요? 학습시켜주세요!
등록된 댓글이 없습니다.