Skip to content
Snippets Groups Projects
Commit 04bd968a authored by Hameed Andy's avatar Hameed Andy
Browse files

changed regular made food and snake colors

parent f3830207
No related branches found
No related tags found
No related merge requests found
...@@ -26,6 +26,7 @@ class Snake(): ...@@ -26,6 +26,7 @@ class Snake():
def draw(self,colour, snake_loc): def draw(self,colour, snake_loc):
for x,y in snake_loc: for x,y in snake_loc:
pygame.draw.rect(win, colour , [x,y, self.size, self.size]) pygame.draw.rect(win, colour , [x,y, self.size, self.size])
pygame.draw.rect(win, colour , [x,y, self.size, self.size])
## pygame.draw.circle(win, lightB , [x,y], int(self.size/2)) ## pygame.draw.circle(win, lightB , [x,y], int(self.size/2))
def die(): def die():
......
...@@ -46,6 +46,8 @@ class Themes(): ...@@ -46,6 +46,8 @@ class Themes():
black1 = (48,47,47) black1 = (48,47,47)
white_green = (239,246,224) white_green = (239,246,224)
white = (255,255,255) white = (255,255,255)
lightR = [220,128,128]
lightB = [29,85,145]
pygame.init() pygame.init()
run = True run = True
...@@ -62,7 +64,7 @@ class Themes(): ...@@ -62,7 +64,7 @@ class Themes():
Themes.custom_text('Regular',"Roboto-Light.ttf", 30,white_green,(95,180),theme) Themes.custom_text('Regular',"Roboto-Light.ttf", 30,white_green,(95,180),theme)
if (75 <= mousepos[0] <= 75+150 and 150 <= mousepos[1] <= 150+100 ): if (75 <= mousepos[0] <= 75+150 and 150 <= mousepos[1] <= 150+100 ):
if mouseclick[0] == 1: if mouseclick[0] == 1:
Gameplay.game(speed,[255,0,0],[0,255,0], white) Gameplay.game(speed, lightB,lightR, white)
Themes.button(theme,black1, [280,150,150,100], 0) Themes.button(theme,black1, [280,150,150,100], 0)
Themes.custom_text('Dark',"Roboto-Light.ttf", 30,white,(325,180),theme) Themes.custom_text('Dark',"Roboto-Light.ttf", 30,white,(325,180),theme)
...@@ -75,7 +77,7 @@ class Themes(): ...@@ -75,7 +77,7 @@ class Themes():
if (180 <= mousepos[0] <= 180+160 and 315 <= mousepos[1] <= 315+100 ): if (180 <= mousepos[0] <= 180+160 and 315 <= mousepos[1] <= 315+100 ):
if mouseclick[0] == 1: if mouseclick[0] == 1:
x = randint(0, 1) x = randint(0, 1)
if(x == 1): Gameplay.game(speed,[255,0,0],[0,255,0],white) if(x == 1): Gameplay.game(speed,lightB,lightR,white)
else: Gameplay.game(speed,white,[255,255,0],black1) else: Gameplay.game(speed,white,[255,255,0],black1)
pygame.display.update() pygame.display.update()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment