From 33eba406477d4ca1851eeff0f909b52ef3dc804b Mon Sep 17 00:00:00 2001 From: Joe Lukas Kalb Date: Tue, 6 Feb 2024 18:56:31 +0100 Subject: [PATCH] refactoring: init_field --- src/main/c/labyrinth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/c/labyrinth.c b/src/main/c/labyrinth.c index 63d9f94..9259093 100644 --- a/src/main/c/labyrinth.c +++ b/src/main/c/labyrinth.c @@ -48,9 +48,9 @@ void set_wall(Field_State** field, unsigned short x, unsigned short y) { } void init_field(Field_State** field, unsigned short len_x, unsigned short len_y){ - for (int x = 0; x < len_x; x++){ - for (int y = 0; y < len_y; y++){ - field[x][y] = WAY; + for (int c_x = 0; c_x < len_x; c_x++){ + for (int c_y = 0; c_y < len_y; c_y++){ + field[c_x][c_y] = WAY; } } }