Browse Source

refactoring: init_field

main^2
Joe Lukas Kalb 11 months ago
committed by Peter Wiebe
parent
commit
33eba40647
  1. 6
      src/main/c/labyrinth.c

6
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){ 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;
} }
} }
} }

Loading…
Cancel
Save