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

Administrator / pygame_lesson3_diy1

  • 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 2b8c37d0 authored 3 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent 6b6d04a1
Hide whitespace changes
Inline Side-by-side
Showing with 4 additions and 2 deletions
  • snake.py
snake.py
View file @ 2b8c37d0
...@@ -21,8 +21,8 @@ ax=360 ...@@ -21,8 +21,8 @@ ax=360
ay=300 ay=300
x, y = 240, 120 x, y = 240, 120
s=0 s=0
m=pygame.font.Font("msjhbd.ttc",100) m=pygame.font.Font("neuropol.ttf",100)
i="傻逼"+str(s) i="sb"+str(s)
t=m.render(i,False,[100,255,100]) t=m.render(i,False,[100,255,100])
position = [(180, 90), (180, 120), (210, 120), (x, y)] position = [(180, 90), (180, 120), (210, 120), (x, y)]
...@@ -73,6 +73,8 @@ while True: ...@@ -73,6 +73,8 @@ while True:
# 将贪吃蛇的身体画上去 # 将贪吃蛇的身体画上去
for i in range(len(position)-1): for i in range(len(position)-1):
screen.blit(body, position[i]) screen.blit(body, position[i])
if x<0 or x>630 or y<0 or y>450:
exit()
screen.blit(t,(0,0)) screen.blit(t,(0,0))
# 将果实画上去 # 将果实画上去
......
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