Commit a457a2df by BellCodeEditor

auto save

parent a62dad7c
Showing with 10 additions and 4 deletions
...@@ -5,11 +5,13 @@ pygame.init() ...@@ -5,11 +5,13 @@ pygame.init()
screen=pygame.display.set_mode((660,480)) screen=pygame.display.set_mode((660,480))
x,y=240,120
right=pygame.image.load("right.png") right=pygame.image.load("right.png")
food=pygame.image.load("apple.png") food=pygame.image.load("apple.png")
bg=pygame.image.load("bg.png") bg=pygame.image.load("bg.png")
body=pygame.image.load("body.png") body=pygame.image.load("body.png")
time=pygame.time.Clock()
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
...@@ -19,5 +21,9 @@ while True: ...@@ -19,5 +21,9 @@ while True:
screen.blit(body,(210,120)) screen.blit(body,(210,120))
screen.blit(body,(180,120)) screen.blit(body,(180,120))
screen.blit(body,(180,90)) screen.blit(body,(180,90))
screen.blit(right,(240,120)) x+=30
pygame.display.update() y+=30
\ No newline at end of file screen.blit(right,(x,y))
pygame.display.update()
time.tick(3)
\ 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