-
Notifications
You must be signed in to change notification settings - Fork 0
/
add_q_static.c
executable file
·29 lines (26 loc) · 1.15 KB
/
add_q_static.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* add_q_static.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ioleksiu <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/08/15 18:52:39 by ioleksiu #+# #+# */
/* Updated: 2017/08/15 18:52:44 by ioleksiu ### ########.fr */
/* */
/* ************************************************************************** */
#include "lem_in.h"
void add_q_static(t_lemin *lem, int *ochered)
{
int v;
int i;
int count;
v = last_v(lem);
i = -1;
count = -1;
while (++i < lem->room_num)
if (lem->matrix[v][i] == 1)
ochered[++count] = i;
while (count < lem->room_num)
ochered[++count] = -1;
}