From 9e00574912d011c872213cde75c5c5895800d705 Mon Sep 17 00:00:00 2001 From: Joe Lukas Kalb Date: Tue, 6 Feb 2024 19:38:24 +0100 Subject: [PATCH] refactoring: ask_lab_walls --- src/main/c/labyrinth.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/c/labyrinth.c b/src/main/c/labyrinth.c index 5acb7d5..fafbe33 100644 --- a/src/main/c/labyrinth.c +++ b/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); }