Page 739 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 739
screen.blit(text_win,[250,570])
ask=1
count=0
elif game_list[random_index]=="scissors":
screen.blit(text_lose,[250,570])
ser.write('a')
coin=0
stage=1
count=0
elif game_list[random_index]=="paper":
screen.blit(text_draw,[200,570])
count=0
if stage==2:
if coin==1:
if ask==1:
screen.blit(text_ask,[150,450])
input_6=GPIO.input(06)
if (input_6==False):
stage=3
ask=0
time.sleep(.01)
input_5=GPIO.input(05)
if (input_5==False):
ser.write('2')
stage=1
ask=0
coin=0
time.sleep(.01)
elif ask==0:
if stage==2:
random_index=random.randrange(3)
screen.blit(text_stage_2,(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)
- 732 -