Commit 8524ca7a by BellCodeEditor

save project

parent 45ae3bab
Showing with 6 additions and 3 deletions
......@@ -2,7 +2,7 @@ import pygame
from pygame import locals
pygame.init()
screen = pygame.display.set_mode((660, 480))
FPSCLOCK=pygame.time.clock()
FPSCLOCK=pygame.time.Clock()
background = pygame.image.load('bg.png')
right = pygame.image.load('right.png')
food = pygame.image.load('apple.png')
......@@ -11,7 +11,7 @@ down = pygame.image.load('down.png')
left = pygame.image.load('left.png')
up = pygame.image.load('up.png')
x,y=240,120
positipon=
positipon=[(90,120),(180,120),(210,120),(x,y)]
setheading='rignt'
snake_head = right
while True:
......@@ -39,8 +39,11 @@ while True:
y+=30
else:
y-=30
positipon.append((x,y))
positipon.pop(0)
screen.blit(background, (0, 0))
screen.blit(right, (240, 120))
screen.blit(snake_head,positipon[-1])
#screen.blit(right, (240, 120))
screen.blit(body, (210, 120))
screen.blit(body, (180, 120))
screen.blit(body, (180, 90))
......
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