天天看點

harry - 學習寫一個界面化猜拳遊戲

# 猜拳遊戲界面化
# 1.導入遊戲工具包
import pygame
# 2。遊戲初始化
pygame.init()
# 3.設定遊戲視窗大小
screen = pygame.display.set_mode((700,600))
# 4.設定遊戲的标題
pygame.display.set_caption('猜拳')
scissors = pygame.image.load('scissors.jpg')

while True:
    for event in pygame.event.get():
        print(event)
        if event.type == pygame.QUIT:
            pygame.quit()
    screen.blit(scissors,(500,500))
    pygame.display.update()


           

繼續閱讀