From f2876a26f8e8d1a00245177cbd903f98834466df Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Tue, 1 Nov 2022 09:59:52 +0100 Subject: [PATCH] Minor changes --- snake/snake.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/snake/snake.py b/snake/snake.py index 98975cb..40bbdcc 100755 --- a/snake/snake.py +++ b/snake/snake.py @@ -119,6 +119,7 @@ class Snake: self.score+=1 pygame.display.flip() clock.tick(self.fps) + return(self.score) game=Snake() @@ -128,4 +129,5 @@ def event_handler(game): game.direction=6 for i in range(0,10): - game.run() \ No newline at end of file + score=game.run() + print("Game ended with "+str(score)) \ No newline at end of file