Commit 8c7b05ac by BellCodeEditor

auto save

parent f6323deb
Showing with 19 additions and 1 deletions
import pygame
from pygame import locals
pygame.init()
screen = pygame.display.set_mode((1280 , 650))
pygame.display.set_caption("Mincecraft")
FPSCLOCK = pygame.time.Clock()
#
background = pygame.image.load('vape')
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
screen.blit(background , (0 , 0))
pygame.display.update()
FPSCLOCK.tick(3)
\ No newline at end of file
...@@ -54,7 +54,7 @@ while True: ...@@ -54,7 +54,7 @@ while True:
position.append((x, y)) position.append((x, y))
position.pop(0) position.pop(0)
# 将背景图画上去 # 将背景图画上去
screen.blit(background, (0, 0))
# 将贪吃蛇的头画上去 # 将贪吃蛇的头画上去
screen.blit(snake_head, position[-1]) screen.blit(snake_head, position[-1])
# 将贪吃蛇的身体画上去 # 将贪吃蛇的身体画上去
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment