This commit is contained in:
Ladebeze66 2024-01-30 17:00:04 +01:00
parent c8dcaba517
commit 0e6abebb7b
4 changed files with 9 additions and 13 deletions

View File

@ -6,7 +6,7 @@
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/14 16:56:52 by fgras-ca #+# #+# */
/* Updated: 2024/01/30 15:47:04 by fgras-ca ### ########.fr */
/* Updated: 2024/01/30 16:44:11 by fgras-ca ### ########.fr */
/* */
/* ************************************************************************** */

View File

@ -10,13 +10,13 @@ C 165, 176, 196
1111100000000000000000000000000000001 10000000001 10000000000000000000000000000000000002000000000000000000000001
1000000000000000000000011111111111111 10000000001 10000000000000000000000000000000000002000000000000000000000001111
100000000000000000000001 10000000001 10000000000000000000000000000000001111111100000000000000000000001
100000000000000000000001111111111111111111000000000111110000000000000000000000000000000001 100000000000000000000001
100000000000000000000001111111111111111111000000000111110000000000000000S00000000000000001 100000000000000000000001
100000000000000000000000000000000000000000000000000002000000000000000000000000000000000001 111111111111000000000001
100000000000000000111100000000000000000000000000000002000000000000000000000000000000000001 1000000000001
1000000000000000001 100000000000000000000000000000002000000000000000000000000000011111111 1000000000001
100000000000000000111100000000000000000000000000000002000000000000000000000000000011111111111111111111111 1000000000001
100000000000000000000000000000000000000000000000000002000000000000000W00000000000000000000000000000000001 1000000000001
110000000000011111100000000000000000000000000000000002000000000000000000000000000000000000000000000000001 1000000000001
10000000000000000011110000000000000000000000000000000200000000000000E000000000000011111111111111111111111 1000000000001
100000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000001 1000000000001
110000000000011111100000000000000N00000000000000000002000000000000000000000000000000000000000000000000001 1000000000001
1000000000001 100000000000000000000000000000000002000000000000000000000000000000000000000000000000001 1000000000001
11000000000001 100000000000000000000000000000000002000000000000000000000000000000000000000000000000001 1000000000001
100000000000011111100000000000000000000000000000000002000000000000000000000000000000000000000000000000001 1000000000001

View File

@ -6,7 +6,7 @@
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/23 19:54:51 by fgras-ca #+# #+# */
/* Updated: 2024/01/29 18:58:31 by fgras-ca ### ########.fr */
/* Updated: 2024/01/30 16:59:15 by fgras-ca ### ########.fr */
/* */
/* ************************************************************************** */
@ -29,7 +29,6 @@ static bool process_player_char(char current_char, t_player_info *player_info)
}
else
{
printf("Multiple player start positions found. Invalid map.\n");
return (false);
}
}
@ -49,11 +48,8 @@ bool find_player(const char *map_content, int length, t_structure_map *map)
player_info.found_player = &found_player;
while (i < length)
{
if (!found_player)
{
if (!process_player_char(map_content[i], &player_info))
return (false);
}
if (!process_player_char(map_content[i], &player_info))
return (false);
calculate_map(map);
update_position(map_content[i],
&player_info.line_number, &player_info.column_number);

View File

@ -6,7 +6,7 @@
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/29 18:57:38 by fgras-ca #+# #+# */
/* Updated: 2024/01/29 18:58:26 by fgras-ca ### ########.fr */
/* Updated: 2024/01/30 16:50:06 by fgras-ca ### ########.fr */
/* */
/* ************************************************************************** */