-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tweaked parser: moved get_player_dir() call after find_start() so tha…
…t we do not try to fetch the player direction before we actually validated the spawn position.
- Loading branch information
Jean Teissier
authored and
Jean Teissier
committed
Aug 26, 2024
1 parent
ec8c7bf
commit d847b1e
Showing
2 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: jteissie <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/08/15 12:12:00 by tsuchen #+# #+# */ | ||
/* Updated: 2024/08/16 19:08:45 by jteissie ### ########.fr */ | ||
/* Updated: 2024/08/26 15:48:20 by jteissie ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -56,10 +56,10 @@ t_parse_status verify_map(char **map, t_data *data) | |
start[1] = 0; | ||
if (check_invalid_chars(map) == MAP_ERR) | ||
return (MAP_ERR); | ||
get_player_dir(data, start[0], start[1]); | ||
fill_whitespaces(map); | ||
if (find_start(start, map) == MAP_ERR) | ||
return (MAP_ERR); | ||
get_player_dir(data, start[0], start[1]); | ||
if (check_walls(map, start[0], start[1], data->map_bound) == MAP_ERR) | ||
return (MAP_ERR); | ||
return (MAP_OK); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: jteissie <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/08/16 18:12:37 by jteissie #+# #+# */ | ||
/* Updated: 2024/08/16 18:46:27 by jteissie ### ########.fr */ | ||
/* Updated: 2024/08/26 15:47:38 by jteissie ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|