Commit 87977957 by BellCodeEditor

auto save

parent 098823a8
Showing with 18 additions and 13 deletions
import pygame import pygame
from pygame import locals from pygame import locals
screen=pygame.display.set_mode((660,720)) screen=pygame.display.set_mode((720,510))
food=pygame.image.info('apple.png') food=pygame.image.load('apple.png')
background=pygame.image.info('bg.png') background=pygame.image.load('bg.png')
body=pygame.image.info('body.png') body=pygame.image.load('body.png')
right=pygame.image.info('right.png') right=pygame.image.load('right.png')
down=pygame.image.info('down.png') down=pygame.image.load('down.png')
up=pygame.image.info('up.png') up=pygame.image.load('up.png')
left=pygame.image.info('left.png') left=pygame.image.load('left.png')
FPSCLOCK=loacls.time.Clock()
x,y=330,100
while True: while True:
for event in pygame.display.event.get(): for event in pygame.event.get():
if event.type==locals.QUIT: if event.type==locals.QUIT:
exit() exit()
screen.display.blit(food,(120,480)) screen.blit(background,(0,0))
screen.display.blit(body,(300,300)) screen.blit(food,(120,480))
screen.display.blit(background(0,0)) screen.blit(body,(300,300))
screen.update() screen.blit(right,(x,y))
pygame.display.update()
x+=30
FPSCLOCK.Clock(3)
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