Browse Source

refactoring: dimesions --> get_lab_dimensions

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

2
src/main/c/labyrinth.c

@ -21,7 +21,7 @@ unsigned short get_natural_number(char text[]){
return result; return result;
} }
void dimesions(unsigned short *len_x, unsigned short *len_y){
void ask_lab_dimensions(unsigned short *len_x, unsigned short *len_y){
*len_x = get_natural_number("Bitte gib die x-Laenge des Labyrinthes an:\n"); *len_x = get_natural_number("Bitte gib die x-Laenge des Labyrinthes an:\n");
*len_y = get_natural_number("Bitte gib die y-Laenge des Labyrinthes an:\n"); *len_y = get_natural_number("Bitte gib die y-Laenge des Labyrinthes an:\n");
} }

2
src/main/c/labyrinth.h

@ -10,6 +10,6 @@ void init_field(Field_State** field, unsigned short len_x, unsigned short len_y)
short lab_can_move(Field_State** field, unsigned short x, unsigned short y, Direction direction, unsigned short len_x, unsigned short len_y); short lab_can_move(Field_State** field, unsigned short x, unsigned short y, Direction direction, unsigned short len_x, unsigned short len_y);
void show_solution(Field_State** field, unsigned short len_x, unsigned short len_y); void show_solution(Field_State** field, unsigned short len_x, unsigned short len_y);
unsigned short get_natural_number(char text[]); unsigned short get_natural_number(char text[]);
void dimesions(unsigned short *len_x, unsigned short *len_y);
void ask_lab_dimensions(unsigned short *len_x, unsigned short *len_y);
#endif // TEST_H #endif // TEST_H
Loading…
Cancel
Save