diff options
| -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) |
