Browse Source

Funktion wegsuchen erstellt

remotes/origin/Labyrinth
Ronja Awe 2 years ago
parent
commit
8014dae17d
  1. 6
      src/c/labyrinth.c
  2. 1
      src/c/labyrinth.h
  3. 21
      test/c/test_labyrinth.c

6
src/c/labyrinth.c

@ -17,4 +17,10 @@ int printlabyrinth(lab laby, int hoehe, int breite){
}
return 0;
}
int wegsuchen(lab laby, int startx, int starty, int zielx, int ziely){
return 0;
}

1
src/c/labyrinth.h

@ -6,5 +6,6 @@
typedef char lab[MAXZEILEN][MAXSPALTEN];
int printlabyrinth(lab laby, int hoehe, int breite);
int wegsuchen(lab laby, int startx, int starty, int zielx, int ziely);
#endif

21
test/c/test_labyrinth.c

@ -24,7 +24,7 @@ void test_runExampleTest(void)
{'1', '2', '3'},
{'4', '5', '6'},
{'7', '8', '9'},
};
};
result = printlabyrinth(laby, hoehe, breite);
@ -33,4 +33,23 @@ void test_runExampleTest(void)
TEST_ASSERT_EQUAL_INT(0, result);
}
void test_LabyrinthAmZiel(void){
int result;
int input = 1;
int hoehe = 3;
int breite = 3;
lab laby = {
{'1', '2', '3'},
{'4', '5', '6'},
{'7', '8', '9'},
};
result = wegsuchen(laby, 0, 0, 0, 0);
TEST_ASSERT_EQUAL_INT(0, result);
}
#endif // TEST
Loading…
Cancel
Save