Minor changes

This commit is contained in:
Loic Guegan 2022-11-01 09:59:52 +01:00
parent 39e8dd6e7c
commit f2876a26f8

View file

@ -119,6 +119,7 @@ class Snake:
self.score+=1 self.score+=1
pygame.display.flip() pygame.display.flip()
clock.tick(self.fps) clock.tick(self.fps)
return(self.score)
game=Snake() game=Snake()
@ -128,4 +129,5 @@ def event_handler(game):
game.direction=6 game.direction=6
for i in range(0,10): for i in range(0,10):
game.run() score=game.run()
print("Game ended with "+str(score))