-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_trm_in_field.c
executable file
·21 lines (19 loc) · 1.21 KB
/
ft_trm_in_field.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_check_trm_in_field.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: istalevs <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/12/30 02:32:00 by istalevs #+# #+# */
/* Updated: 2017/12/30 02:32:00 by istalevs ### ########.fr */
/* */
/* ************************************************************************** */
#include "fillit.h"
void ft_trm_in_field(char *field, const int *trm_crd, int x, size_t side)
{
*((field + trm_crd[0]) + trm_crd[1] * side) = (char)(x + 64);
*((field + trm_crd[2]) + trm_crd[3] * side) = (char)(x + 64);
*((field + trm_crd[4]) + trm_crd[5] * side) = (char)(x + 64);
*((field + trm_crd[6]) + trm_crd[7] * side) = (char)(x + 64);
}