Commit f7949253 by BellCodeEditor

auto save

parent 7e8a99f1
Showing with 33 additions and 3 deletions
import pygame import pygame
# from random import randint from pygame import locals
pygame.init() pygame.init()
background=pygame.image.load('bg.png')
food=pygame.image.load('apple.png')
head=pygame.image.load('right.png')
body=pygame.image.load('body.png')
screen=pygame.display.set_mode((660,480)) screen=pygame.display.set_mode((660,480))
# a=randint(2,5) while 1:
# print(a) for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
screen.blit(background,(0,0))
screen.blit(body,(0,0))
screen.blit(body,(30,0))
screen.blit(head,(60,0))
screen.blit(food,(630,450))
pygame.display.update()
\ No newline at end of file
import pygame
from pygame import locals
pygame.init()
background=pygame.image.load('bg.png')
food=pygame.image.load('apple.png')
screen=pygame.display.set_mode((660,480))
while 1:
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
screen.blit(background,(0,0))
screen.blit(food,(0,0))
screen.blit(food,(630,0))
screen.blit(food,(0,450))
screen.blit(food,(630,450))
pygame.display.update()
\ 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