def victory():
pygame.init()
#font = pygame.font.Font("bithigh.ttf",15)
font = pygame.font.SysFont("arial",20)
pygame.key.set_repeat(1,10)
screen = pygame.display.set_mode((X_SCREEN, Y_SCREEN))
screen.fill((255,255,255))
label = font.render("You won the game, try-hard. Spacebar",1,(0,0,0))
screen.blit(label,(20,20))
clock = pygame.time.Clock()
while 1:
deltat = clock.tick(FRAMES_PER_SECOND)
for event in pygame.event.get():
if not hasattr(event, 'key'): continue
#TODO: switch with dict
if event.key == pygame.K_SPACE:
main()
pygame.display.flip()
评论列表
文章目录