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

GPIO.setup(13,GPIO.IN)#가위버튼
            GPIO.setup(19,GPIO.IN)#바위버튼
            GPIO.setup(26,GPIO.IN)#보버튼
            GPIO.setup(06,GPIO.IN)#계속
            GPIO.setup(05,GPIO.IN)#중단
            #색정의
            BACKGROUND=(255,255,54)
            BLACK=(0,0,0)
            WHITE=(255,255,255)
            GREEN=(171,242,0)
            RED=(255,0,0)
            SKYBLUE=(0,216,255)
            BLUE=(1,0,255)
            ORANGE=(255,112,18)
            YELLOW=(255,255,36)
            PURPLE=(149,54,255)
            PINK=(255,36,255)
            game_list=["rock","scissors","paper"]
            pygame.init()#파이게임  초기화
            size=(1280,1024)#화면  사이즈
            screen=pygame.display.set_mode(size)
            pygame.display.set_caption("Rock,Scissors,Paper!!")#제목
            #이미지  파일  정의
            rock=pygame.image.load('R.JPG')
            scissors=pygame.image.load('S.JPG')
            paper=pygame.image.load('P.JPG')
            #텍스트  출력하기
            #폰트  지정(폰트형식,크기)
            font_title=pygame.font.Font('/home/pi/Python_MDP/1.ttf',120)
            font_main=pygame.font.Font('/home/pi/Python_MDP/THE_Kyuteuraebit.ttf',70)


            #텍스트  지정
            text_title=font_title.render(u"복불복  게임!!",True,PINK)
            text_user=font_main.render(u"플레이어",True,PURPLE)#텍스트  출력
            text_computer=font_main.render(u"컴퓨터",True,PURPLE)
            text_computer1=font_main.render(u"*카드를찍어주세요!*",True,ORANGE)
            text_win=font_main.render(u"승리!",True,RED)
            text_draw=font_main.render(u"다시한번!",True,BLACK)
            text_lose=font_main.render(u"패배!",True,RED)
            text_ask=font_main.render(u"중단  or  계속",  True,  RED)
            text_stage_1=font_main.render(u"1단계!",  True,  GREEN)




                                                         -  728  -
   730   731   732   733   734   735   736   737   738   739   740