Page 744 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 744
if stage==4:
if coin==1:
if stage==4:
random_index=random.randrange(3)
screen.blit(text_stage_4,(900,450))
input_13=GPIO.input(13)
if(input_13==False):
count=1
time.sleep(.01)
input_19=GPIO.input(19)
if(input_19==False):
count=2
time.sleep(.01)
input_26=GPIO.input(26)
if(input_26==False):
count=3
time.sleep(.01)
if count==1:
if game_list[random_index]=="rock":
screen.blit(rock,(820,250))
elif game_list[random_index]=="scissors":
screen.blit(scissors,(820,250))
elif game_list[random_index]=="paper":
screen.blit(paper,(820,250))
screen.blit(rock,(180,250))
if game_list[random_index]=="rock":
screen.blit(text_draw,[200,570])
count=0
elif game_list[random_index]=="scissors":
screen.blit(text_win,[250,570])
ser.write('4')
coin=0
count=0
stage=1
elif game_list[random_index]=="paper":
screen.blit(text_lose,[250,570])
ser.write('a')
coin=0
stage=1
count=0
- 737 -