From 5ddabff448f606ce5ce6a74f98ee11bef6640734 Mon Sep 17 00:00:00 2001 From: Ankit Mazumdar Date: Mon, 14 Oct 2024 16:51:37 +0530 Subject: [PATCH] SNAKE game color.py The game features colorful graphics, with the snake in green, food in red, and a blue background, making it visually appealing. --- SNAKE/color.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 SNAKE/color.py diff --git a/SNAKE/color.py b/SNAKE/color.py new file mode 100644 index 00000000..a920cf64 --- /dev/null +++ b/SNAKE/color.py @@ -0,0 +1,15 @@ +# Define colors +WHITE = (255, 255, 255) +BLACK = (0, 0, 0) +RED = (213, 50, 80) # Color for the food +GREEN = (0, 255, 0) # Color for the snake +BLUE = (50, 153, 213) # Background color + +# Fill screen with background color +screen.fill(BLUE) + +# Draw the snake in GREEN +pygame.draw.rect(screen, GREEN, [block[0], block[1], snake_block, snake_block]) + +# Draw the food in RED +pygame.draw.rect(screen, RED, [food_x, food_y, snake_block, snake_block])