Fixed missing check
This commit is contained in:
12
game.c
12
game.c
@@ -144,10 +144,14 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (result == WALL || result == SNAKE)
|
if (result == WALL || result == SNAKE)
|
||||||
{
|
{
|
||||||
MLV_draw_text(
|
if (result == WALL)
|
||||||
width / 2 - 75, height / 2,
|
{
|
||||||
"Game Over! You hit something.",
|
MLV_draw_text(width / 2 - 75, height / 2, "Game Over! You hit a wall.", MLV_COLOR_RED);
|
||||||
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_actualise_window();
|
||||||
MLV_wait_seconds(3);
|
MLV_wait_seconds(3);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user