deff bonus pas bonus
This commit is contained in:
parent
2a8ffb82a2
commit
66f7fb04b2
5
draw.c
5
draw.c
@ -6,7 +6,7 @@
|
||||
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/12/13 15:49:23 by cchauvet #+# #+# */
|
||||
/* Updated: 2023/01/13 16:04:19 by cchauvet ### ########.fr */
|
||||
/* Updated: 2023/01/13 18:34:28 by cchauvet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -58,7 +58,8 @@ int ft_draw_map(t_data *data)
|
||||
void *img;
|
||||
|
||||
ft_fill_pos(data->map);
|
||||
data->nb_swaps = ++data->nb_swaps % (NB_COLORS - 6);
|
||||
if (BONUS)
|
||||
data->nb_swaps++;
|
||||
patern = ft_get_player_map(*data->map);
|
||||
if (patern == NULL)
|
||||
return (1);
|
||||
|
6
main.c
6
main.c
@ -6,7 +6,7 @@
|
||||
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/12/12 17:20:17 by cchauvet #+# #+# */
|
||||
/* Updated: 2023/01/13 15:44:38 by cchauvet ### ########.fr */
|
||||
/* Updated: 2023/01/13 18:35:20 by cchauvet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -29,7 +29,9 @@ int ft_initialised(char *path, t_data *data)
|
||||
data->map = map;
|
||||
data->window = mlx_new_window(data->mlx, WINDOW_SIZE, WINDOW_SIZE, "long");
|
||||
data->nb_foots = 0;
|
||||
data->nb_swaps = ft_random_generator(0, 100);
|
||||
data->nb_swaps = 35;
|
||||
if (BONUS)
|
||||
data->nb_swaps = ft_random_generator(0, 100);
|
||||
ft_draw_map(data);
|
||||
mlx_hook(data->window, 17, (0L), ft_exit, data);
|
||||
mlx_hook(data->window, 2, (1L << 0), ft_key, data);
|
||||
|
2
solong.h
2
solong.h
@ -6,7 +6,7 @@
|
||||
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/01/04 16:20:03 by cchauvet #+# #+# */
|
||||
/* Updated: 2023/01/13 15:50:03 by cchauvet ### ########.fr */
|
||||
/* Updated: 2023/01/13 18:37:03 by cchauvet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user