Browse Source

refactoring: ask_lab_walls

remotes/origin/Joe
Joe Lukas Kalb 11 months ago
parent
commit
9e00574912
  1. 8
      src/main/c/labyrinth.c

8
src/main/c/labyrinth.c

@ -117,16 +117,16 @@ short lab_can_move(Field_State** field, unsigned short x, unsigned short y, Dire
void ask_lab_walls(Field_State** field, unsigned short len_x, unsigned short len_y){
unsigned short x, y;
short a;
short wall_input_continue;
init_field(field, len_x, len_y);
do {
a = get_wall_input(&x, &y, len_x, len_y);
if (a == 0){
wall_input_continue = get_wall_input(&x, &y, len_x, len_y);
if (wall_input_continue == 0){
set_wall(field, x, y);
show_solution(field, len_x, len_y);
}
} while (a != 1);
} while (wall_input_continue != 1);
}
Loading…
Cancel
Save