From ee6cbca4001ccbe0234d0d5d464b4148a45baac0 Mon Sep 17 00:00:00 2001 From: "Ahmet Sungur (Student)" <ahmet2.sungur@live.uwe.ac.uk@csctcloud.prxhn32zsyjupl12zde3wlfkch.cwx.internal.cloudapp.net> Date: Wed, 2 Apr 2025 16:03:23 +0100 Subject: [PATCH] mm --- src/main.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index f97a4e0..865ce26 100644 --- a/src/main.c +++ b/src/main.c @@ -148,10 +148,26 @@ int main(void) { case PAUSED: for (int i = 0; i < snake.length; i++){ - DrawRectangle(snake.segments[i].x * CELL_SIZE, - snake.segments[i].y * CELL_SIZE, - CELL_SIZE, CELL_SIZE, GREEN); - } + if (i == 0) { + DrawCircle(snake.segments[i].x * CELL_SIZE + CELL_SIZE/2, + snake.segments[i].y * CELL_SIZE + CELL_SIZE/2, + CELL_SIZE/2, DARKGREEN); + // Eyes for the head + DrawCircle(snake.segments[i].x * CELL_SIZE + CELL_SIZE/3, + snake.segments[i].y * CELL_SIZE + CELL_SIZE/3, + CELL_SIZE/8, YELLOW); + DrawCircle(snake.segments[i].x * CELL_SIZE + 2*CELL_SIZE/3, + snake.segments[i].y * CELL_SIZE + CELL_SIZE/3, + CELL_SIZE/8, YELLOW); + } + // Draw snake body + else { + DrawCircle(snake.segments[i].x * CELL_SIZE + CELL_SIZE/2, + snake.segments[i].y * CELL_SIZE + CELL_SIZE/2, + CELL_SIZE/2 - 2, GREEN); + } + } + DrawRectangle(food.position.x * CELL_SIZE, food.position.y * CELL_SIZE, -- GitLab