-
Notifications
You must be signed in to change notification settings - Fork 1
/
victory.c
37 lines (34 loc) · 1.54 KB
/
victory.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
37
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* victory.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: szerisen <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/21 16:12:06 by szerisen #+# #+# */
/* Updated: 2023/04/20 20:39:26 by szerisen ### ########.fr */
/* */
/* ************************************************************************** */
#include "so_long.h"
void winner(t_data *data)
{
mlx_destroy_window(data->mlx, data->win);
printf("-----------------------------------------------\n");
printf("| 🎉🎉🎉 Congratulations!!!!! 🎉🎉🎉 |\n");
printf("| You found all collectibles and exit. |\n");
printf("| ✓✓✓✓✓✓✓✓ You won! ✓✓✓✓✓✓✓✓ |\n");
printf("| Is %d moves the best you can do? |\n", data->counter);
printf("-----------------------------------------------\n");
free_double_pointer(data);
exit(EXIT_SUCCESS);
}
void ft_putstr_fd(char *s, int fd)
{
if (!s)
return ;
while (*s)
{
write(fd, s, 1);
s++;
}
}