Commit 83365e59 by BellCodeEditor

save project

parent 84eb5717
Showing with 21 additions and 25 deletions
import pygame
from pygame import locals
pygame.init()
sceen = pygame.display.set_mode((800,600))
screen = pygame.display.set_mode((800,600))
bg = pygame.image.load('bg.png')
snack_right = pygame.image.load('right.png')
apple = pygame.image.load('apple.png')
snack_x = 120
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
if event.type == 3:
if event.key == 275:
if snack_x < 210:
snack_x += 30
screen.blit(bg,(0,0))
screen.blit(snack_right,(snack_x,210))
screen.blit(apple,(90,30))
pygame.display.update()
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