From 8014dae17d6265e2c00515d85f405ff127f449f9 Mon Sep 17 00:00:00 2001 From: Ronja Awe Date: Mon, 30 Jan 2023 14:44:38 +0100 Subject: [PATCH] Funktion wegsuchen erstellt --- src/c/labyrinth.c | 6 ++++++ src/c/labyrinth.h | 1 + test/c/test_labyrinth.c | 21 ++++++++++++++++++++- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/c/labyrinth.c b/src/c/labyrinth.c index dc8b99c..b1b98e2 100644 --- a/src/c/labyrinth.c +++ b/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; } \ No newline at end of file diff --git a/src/c/labyrinth.h b/src/c/labyrinth.h index bda98ae..35e6aae 100644 --- a/src/c/labyrinth.h +++ b/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 \ No newline at end of file diff --git a/test/c/test_labyrinth.c b/test/c/test_labyrinth.c index 5f3aa56..fb7f7ea 100644 --- a/test/c/test_labyrinth.c +++ b/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 \ No newline at end of file