Browse Source

dimesions

remotes/origin/Joe
Joe Lukas Kalb 11 months ago
parent
commit
711d24f20e
  1. 5
      src/main/c/labyrinth.c
  2. 1
      src/main/c/labyrinth.h

5
src/main/c/labyrinth.c

@ -21,6 +21,11 @@ unsigned short get_natural_number(char text[]){
return result; return result;
} }
void dimesions(unsigned short *len_x, unsigned short *len_y){
*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");
}
void turn_direction_right(Direction *direction){ void turn_direction_right(Direction *direction){
switch (*direction) { switch (*direction) {
case N: case N:

1
src/main/c/labyrinth.h

@ -10,5 +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);
#endif // TEST_H #endif // TEST_H
Loading…
Cancel
Save