-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_reset.c
35 lines (32 loc) · 1.14 KB
/
ft_reset.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_reset.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ohachim <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/11/23 00:35:02 by ohachim #+# #+# */
/* Updated: 2018/11/25 15:02:03 by magoumi ### ########.fr */
/* */
/* ************************************************************************** */
#include "header.h"
char **ft_reset(char l, char **board)
{
int i;
int j;
int size;
i = 0;
size = (int)ft_strlenc(*board, '$');
while (i < size)
{
j = 0;
while (j < size)
{
if (board[i][j] == l)
board[i][j] = '.';
j++;
}
i++;
}
return (board);
}