Commit 8d14889b by BellCodeEditor

save project

parent b2670dc3
apple.png

2.05 KB

bg.png

22.5 KB

body.png

1.4 KB

down.png

2.01 KB

left.png

2.07 KB

File added
right.png

2.05 KB

import pygame
pygame.init()
sc=pygame.display.set_mode((800,600))
time=pygame.time.Clock()
x,y=240,120
while True:
for i in pygame.event.get():
if i.type == pygame.QUIT:
exit()
x+=30
sc.blit(pygame.image.load('bg.png'),(0,0))
sc.blit(pygame.image.load('left.png'),(x,y))
sc.blit(pygame.image.load('body.png'),(x-30,y))
sc.blit(pygame.image.load('body.png'),(x-60,y))
sc.blit(pygame.image.load('apple.png'),(180,y))
time.tick(3)
pygame.display.update()
\ No newline at end of file
up.png

2.05 KB

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