Commit db5782d6 by BellCodeEditor

save project

parent 98d5b046
Showing with 6 additions and 3 deletions
import pygame
from pygame import locals
import random
# 初始化pygame,为使用硬件做准备
pygame.init()
......@@ -14,6 +14,8 @@ food = pygame.image.load('apple.png')
body = pygame.image.load('body.png')
x,y=240,120
p=[(180,90),(180,120),(210,120),(x,y)]
a_x=360
a_y=300
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -36,4 +38,5 @@ while True:
screen.blit(food, (360, 300))
# 刷新画面
pygame.display.update()
FPSLOPCK.tick(5)
\ No newline at end of file
FPSLOPCK.tick(5)
\ No newline at end of file
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