Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / pygame_lesson3_diy4

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit 5b43a89d authored 2 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

auto save

parent 25c3f1b6
Show whitespace changes
Inline Side-by-side
Showing with 4 additions and 9 deletions
  • snake.py
snake.py
View file @ 5b43a89d
......@@ -11,13 +11,7 @@ body = pygame.image.load('body.png')
left = pygame.image.load('left.png')
up = pygame.image.load('up.png')
down = pygame.image.load('down.png')
a = pygame.font.Font('neuropol.ttf',18)
b = pygame.font.Font('neuropol.ttf',18)
c = pygame.font.Font('neuropol.ttf',18)
d = pygame.font.Font('neuropol.ttf',18)
e = pygame.font.Font('neuropol.ttf',18)
f = pygame.font.Font('neuropol.ttf',18)
g = pygame.font.Font('neuropol.ttf',18)
z = pygame.font.Font('neuropol.ttf',18)
x, y = 240, 120
position = [(180, 90), (180, 120), (210, 120), (x, y)]
setheading = "right"
......@@ -81,8 +75,8 @@ while True:
screen.blit(body, position[i])
screen.blit(food, (a,b))
screen.blit(food, (c,d))
a = "Score:" + str(score)
text = a.render(z,True,(0,255,255))
z = "Score:" + str(score)
text = z.render(z,True,(0,255,255))
screen.blit(text,(540,10))
pygame.display.update()
FPSCLOCK.tick(score/10+3)
\ No newline at end of file
This diff is collapsed. Click to expand it.
  • Write
  • Preview
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