Commit 2b2bf3b2 by BellCodeEditor

save project

parent 2044fffa
Showing with 7 additions and 1 deletions
import pygame
from pygame import locals
print("记住你看到的东西")
pygame.init()
screen=pygame.display.set_mode((1056,591))
FPS=pygame.time.Clock()
......@@ -8,13 +7,20 @@ background = pygame.image.load('src=http___img.3dmgame.com_uploads_images_news_2
right = pygame.image.load('right.png')
food = pygame.image.load('034c0f3479e3bda807cb8c83ed7a201d(1).jpg')
body = pygame.image.load('body.png')
left=pygame.image.load('left.png')
up=pygame.image.load('up.png')
down=pygame.image.load('down.png')
x,y=240,120
pos=[(180,90),(180,120),(210,120),(x,y)]
set='right'
snake_head = right
while True:
for event in pygame.event.get():
print(event)
if event.type == locals.QUIT:
exit()
elif event.type == locals.KEYDOWN:
if event.key ==
x+=30
pos.append((x,y))
pos.pop(0)
......
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