1 Commits
tp7 ... tp6

Author SHA1 Message Date
d3742d73ea Fixed missing check 2025-05-20 14:28:08 +02:00

12
game.c
View File

@@ -144,10 +144,14 @@ int main(int argc, char *argv[])
if (result == WALL || result == SNAKE)
{
MLV_draw_text(
width / 2 - 75, height / 2,
"Game Over! You hit something.",
MLV_COLOR_RED);
if (result == WALL)
{
MLV_draw_text(width / 2 - 75, height / 2, "Game Over! You hit a wall.", MLV_COLOR_RED);
}
else if (result == SNAKE)
{
MLV_draw_text(width / 2 - 75, height / 2, "Game Over! You hit yourself.", MLV_COLOR_RED);
}
MLV_actualise_window();
MLV_wait_seconds(3);
break;