Commit ce6c9dda by BellCodeEditor

save project

parent 044b9354
Showing with 29 additions and 2 deletions
import pygame
from pygame import locals
pygame.init()
screen=pygame.display.set_mode((600,480))
background = pygame.image.load("bg.png")
right = pygame.image.load("right.png")
food = pygame.image.load("apple.png")
left = pygame.image.load("left.png")
up = pygame.image.load("up.png")
down = pygame.image.load("down.png")
while True:
for event in pygame.event.get()
if event.type == locals.QUIT:
exit()
screen.blit(background,(0,0))
screen.blit(right,(240,120))
screen.blit(food,(360,300))
pygame.display.update()
......@@ -7,7 +7,7 @@ screen=pygame.display.set_mode((600,480))
background = pygame.image.load("bg.png")
right = pygame.image.load("right.png")
apple = pygame.image.load("apple.png")
food = pygame.image.load("apple.png")
left = pygame.image.load("left.png")
up = pygame.image.load("up.png")
down = pygame.image.load("down.png")
......@@ -18,7 +18,7 @@ while True:
exit()
screen.blit(background,(0,0))
screen.blit(fight,(240,120))
screen.blit(right,(240,120))
screen.blit(food,(360,300))
......
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