diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-11-01 13:45:41 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-11-01 13:45:41 +0100 |
| commit | 67a79a65dd938019ce13b8f616d320548bb273e7 (patch) | |
| tree | 9b0bf76e9322b7d9c7f08c7f45cdf832f3be8ad3 | |
| parent | f5974e8699e6e73685d45afec272627d2a637cac (diff) | |
Minor changes
| -rwxr-xr-x | snake.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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) |
