From 12c4d7d7d697316fe9d5a730b09a1541540aefe6 Mon Sep 17 00:00:00 2001 From: Shiwank19 <37938063+Shiwank19@users.noreply.github.com> Date: Sun, 7 Apr 2019 18:48:18 +0530 Subject: [PATCH] Modified Color Flipping Food Modified the Food Flipping its Color. Used randint() function to make food frequently change its color. --- Snake Game/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Snake Game/main.py b/Snake Game/main.py index 7ec8b9b..373f7f6 100644 --- a/Snake Game/main.py +++ b/Snake Game/main.py @@ -68,7 +68,7 @@ def collide(self): def show(self): no_stroke() - fill(255, 0, 0) + fill(randint(20,255), randint(20,255), randint(20,255)) rect(self.pos, self.snake.size, self.snake.size) snake = Snake(20) @@ -91,4 +91,4 @@ def draw(): food.collide() food.show() -run(frame_rate = 10) \ No newline at end of file +run(frame_rate = 10)