/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* get_cur_pos.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: smatthes +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/03/26 21:56:39 by smatthes #+# #+# */ /* Updated: 2023/03/26 21:56:44 by smatthes ### ########.fr */ /* */ /* ************************************************************************** */ #include void get_cur_pos(int **board, int *pos, int n) { int i = -1; int j = -1; while (++i < n) { while (++j < n) { if (board[i][j] == 0) { pos[0] = i; pos[1] = j; return; } } j = -1; } return; }