Commit fb6beda0 by BellCodeEditor

auto save

parent 74c82b66
Showing with 4 additions and 12 deletions
......@@ -17,7 +17,6 @@ background = pygame.image.load('bg.png')
font = pygame.font.Font('STKAITI.TTF', 60) # 字体
center = [2,8]
b =[(0,-1),(0,0),(0,1),(-1,0)]
while True:
for event in pygame.event.get():
......@@ -37,16 +36,9 @@ while True:
# 将背景图画上去
a =font.render("0",True,(0,0,0))
screen.blit(background,(0,0))
screen.blit(a,(360,80))
c = []
for i in b:
d = (i[0]+center[0],i[1]+center[1])
c.append(d)
for i in c:
pygame.draw.rect(screen,(225,0,0),(i[1]*20-20,i[0]*20-20,20,20),0)
pygame.draw.rect(screen,(225,225,225),(i[1]*20-20,i[0]*20-20,20,20),1)
screen.blit(a,(360,80))
pygame.draw.rect(screen,(225,0,0),(center[1]*20-20,center[0]*20-20,20,20),0)
pygame.draw.rect(screen,(225,225,225),(center[1]*20-20,center[0]*20-20,20,20),1)
# 刷新画面
pygame.display.update()
clock.tick(30)
clock.tick(FPS)
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