Minor changes

This commit is contained in:
Loic Guegan 2022-11-01 13:45:41 +01:00
parent f5974e8699
commit 67a79a65dd

View file

@ -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)