diff --git a/src/SimpleKI.c b/src/SimpleKI.c new file mode 100644 index 0000000..63ee480 --- /dev/null +++ b/src/SimpleKI.c @@ -0,0 +1,11 @@ +#include +#include +#include +#include "Spieler.h" +#include "Moving.h" +#include "Schachbrett" + + +bool einfache_KI(Brett, startX,startY,endX,endY,player){ + // Funktion für KI-Gegner +} diff --git a/src/SimpleKI.h b/src/SimpleKI.h new file mode 100644 index 0000000..2b5b63c --- /dev/null +++ b/src/SimpleKI.h @@ -0,0 +1,11 @@ +#ifndef SIMPLEKI_H +#define SIMPKLEKI_H +#include +#inlude "Moving.h" +#include +#include "Schachbrett.h" +#include "Spieler.h" + +bool einfache_KI(Brett, startX,startY,endX,endY,player); + +#endif diff --git a/test/test_Moving.c b/test/test_Moving.c index 8ef5569..6af0d61 100644 --- a/test/test_Moving.c +++ b/test/test_Moving.c @@ -145,5 +145,19 @@ void test_istzugerlaubt_Turm(void){ } free(brett); } +void test_Laeufer_black_Moving(void) { + char** brett = Schachbrett_erstellen(); + Player player = PLAYER_BLACK; + // Prüfen, ob der Zug eine Diagonale ist == true + brett[6][6] = 'b'; + TEST_ASSERT_TRUE(istzugerlaubt(brett, 6, 6, 3, 3, player)); + + for (int i = 0; i < 8; i++) { + free(brett[i]); + } + free(brett); + + +} #endif // TEST diff --git a/test/test_SimpleKI.c b/test/test_SimpleKI.c new file mode 100644 index 0000000..72f0c30 --- /dev/null +++ b/test/test_SimpleKI.c @@ -0,0 +1,21 @@ +#ifdef TEST +#include "unity.h" +#include "Schachbrett.h" +#include "Moving.h" +#include "Spieler.h" +#include "Turm.h" +#include "Bauer.h" +#include "Koenig.h" +#include "Springer.h" +#include "Dame.h" +#include "Laeufer.h" +#include + +void setUp(void) { +} + +void tearDown(void) { +} + + +#endif // TEST