Page 742 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 742

coin=0
                                                                 time.sleep(.01)
                                            elif  ask==0:
                                                       if  stage==3:
                                                        random_index=random.randrange(3)
                                                                           screen.blit(text_stage_3,(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])
                                                       ask=1
                                                       count=0
                                            elif  game_list[random_index]=="paper":
                                                                            screen.blit(text_lose,[250,570])
                                                       ser.write('a')
                                                       coin=0
                                                       stage=1
                                                       count=0
                                 elif  count==2:




                                                         -  735  -
   737   738   739   740   741   742   743   744   745   746   747