import random
import pygame
def ():
font=pygame.font.SysFont()
def ziti(screen,text,x,y,size = 24,color=(232,206,144)):
pygame.init()
screen = pygame.display.set_mode((700,600))
pygame.display.set_caption('猜拳')
scissors = pygame.image.load('scissors.jpg')
rock = pygame.image.load('rock.jpg')
paper = pygame.image.load('paper.jpg')
diannao = ['scissors.jpg','rock.jpg','paper.jpg']
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
screen.blit(scissors,(500,100))
screen.blit(rock, (100, 100))
screen.blit(paper, (300, 100))
screen.blit(pygame.image.load(diannao[random.randint(0,2)]),(300,350))
pygame.display.update()
转载请注明原文地址:https://ipadbbs.8miu.com/read-18455.html