Fixed cli level selection and added 2 more levels

This commit is contained in:
2025-06-02 08:24:29 +02:00
parent 9a754e94be
commit c4d0ba3f1c
3 changed files with 45 additions and 2 deletions

3
game.c
View File

@@ -71,8 +71,6 @@ int main(int argc, char *argv[])
previous_score = global_score;
input_file = NULL;
if (input_file == NULL)
{
char level_file[256];
@@ -284,6 +282,7 @@ int main(int argc, char *argv[])
MLV_free_window();
free_grid(g);
free_snake(snake);
input_file = NULL;
if (touche == MLV_KEYBOARD_ESCAPE)
{

22
levels/level3 Normal file
View File

@@ -0,0 +1,22 @@
w w
w
ssssS w
w f
w
w
w
w f
f w
wwwwwwwwwwwwwwwwwwwwwwwww wwwwwwwww
f
w w

22
levels/level4 Normal file
View File

@@ -0,0 +1,22 @@
w w
w
f w
ssssS w
wwwwwwwwww
f
w
w
w
www w
f w f
w
w
f
wwwwwww
f
w w