|
@ -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){ |
|
|
void ask_lab_walls(Field_State** field, unsigned short len_x, unsigned short len_y){ |
|
|
unsigned short x, y; |
|
|
unsigned short x, y; |
|
|
short a; |
|
|
|
|
|
|
|
|
short wall_input_continue; |
|
|
|
|
|
|
|
|
init_field(field, len_x, len_y); |
|
|
init_field(field, len_x, len_y); |
|
|
|
|
|
|
|
|
do { |
|
|
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); |
|
|
set_wall(field, x, y); |
|
|
show_solution(field, len_x, len_y); |
|
|
show_solution(field, len_x, len_y); |
|
|
} |
|
|
} |
|
|
} while (a != 1); |
|
|
|
|
|
|
|
|
} while (wall_input_continue != 1); |
|
|
} |
|
|
} |
|
|
|
|
|
|