-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
36 lines (33 loc) · 1.31 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maceccar <maceccar@student.42firenze.it> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/30 11:22:43 by maceccar #+# #+# */
/* Updated: 2024/05/03 00:47:17 by maceccar ### ########.fr */
/* */
/* ************************************************************************** */
#include "so_long.h"
//Args check
//Parsing and check map
//Start game
//Free game in each case at the end of program
int main(int argc, char *argv[])
{
t_game *game;
if (argc != 2)
{
ft_printf("Error, Specify a map file\n");
return (0);
}
game = get_map(argv[1]);
if (!game)
ft_printf("Error, allocation failed!!\n");
if (game->is_map_valid == false)
ft_printf("%s\n", game->reason);
else
start_game(game);
free_game(game);
}