summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-11-01 13:45:41 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-11-01 13:45:41 +0100
commit67a79a65dd938019ce13b8f616d320548bb273e7 (patch)
tree9b0bf76e9322b7d9c7f08c7f45cdf832f3be8ad3
parentf5974e8699e6e73685d45afec272627d2a637cac (diff)
Minor changes
-rwxr-xr-xsnake.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/snake.py b/snake.py
index 85857ab..0a37ae4 100755
--- a/snake.py
+++ b/snake.py
@@ -96,9 +96,11 @@ class Snake:
self.draw_pts(elt[0],elt[1],color=(color[0],int(color[1]/2),color[2]),scale=0.86)
def draw_apple(self,radius=None):
+ """
+ Draw the apple on the screen
+ """
if radius==None:
radius=self.grid_pts/2
- #self.draw_pts(self.apple[0],self.apple[1],color=(210,0,0))
pygame.draw.circle(self.screen, (210,0,0), (self.apple[0]*self.grid_pts+int(self.grid_pts/2),self.apple[1]*self.grid_pts+self.margin+int(self.grid_pts/2)), radius)
pygame.draw.circle(self.screen, (170,0,0), (self.apple[0]*self.grid_pts+int(self.grid_pts/2),self.apple[1]*self.grid_pts+self.margin+int(self.grid_pts/2)), radius/1.5)