|
@ -5,6 +5,7 @@ |
|
|
#include "Historie.h" |
|
|
#include "Historie.h" |
|
|
#include "En_Passaut.h" |
|
|
#include "En_Passaut.h" |
|
|
#include "Bauer.h" |
|
|
#include "Bauer.h" |
|
|
|
|
|
#include "Spieler.h" |
|
|
|
|
|
|
|
|
void setUp(void) { |
|
|
void setUp(void) { |
|
|
} |
|
|
} |
|
@ -14,7 +15,6 @@ void tearDown(void) { |
|
|
|
|
|
|
|
|
void test_En_Passaut_Weiss(void) { |
|
|
void test_En_Passaut_Weiss(void) { |
|
|
|
|
|
|
|
|
/* void test_hinzufuegen_historie(void) { |
|
|
|
|
|
int MAX_ZUEGE = 70; |
|
|
int MAX_ZUEGE = 70; |
|
|
int ZUG_INFO = 5; |
|
|
int ZUG_INFO = 5; |
|
|
|
|
|
|
|
@ -23,15 +23,36 @@ void test_En_Passaut_Weiss(void) { |
|
|
|
|
|
|
|
|
// Testdaten |
|
|
// Testdaten |
|
|
int startX = 1; |
|
|
int startX = 1; |
|
|
int startY = 2; |
|
|
|
|
|
int endX = 3; |
|
|
|
|
|
|
|
|
int startY = 6; |
|
|
|
|
|
int endX = 1; |
|
|
int endY = 4; |
|
|
int endY = 4; |
|
|
Player currentPlayer = PLAYER_WHITE; |
|
|
|
|
|
|
|
|
Player currentPlayer = PLAYER_BLACK; |
|
|
int anzahl_Zuege = 0; |
|
|
int anzahl_Zuege = 0; |
|
|
|
|
|
|
|
|
// Züge zur Historie hinzufügen |
|
|
// Züge zur Historie hinzufügen |
|
|
hinzufuegen_historie(meineHistorie, startX, startY, endX, endY, currentPlayer, anzahl_Zuege); |
|
|
hinzufuegen_historie(meineHistorie, startX, startY, endX, endY, currentPlayer, anzahl_Zuege); |
|
|
|
|
|
|
|
|
|
|
|
char** brett = Schachbrett_erstellen(); |
|
|
|
|
|
clear_Schachbrett(brett); |
|
|
|
|
|
|
|
|
|
|
|
TEST_ASSERT_NOT_NULL(brett); |
|
|
|
|
|
|
|
|
|
|
|
brett[endY][endX] = 'p'; |
|
|
|
|
|
anzahl_Zuege++; |
|
|
|
|
|
startX = 2; |
|
|
|
|
|
startY = 4; |
|
|
|
|
|
endX = 2; |
|
|
|
|
|
endY = 5; |
|
|
|
|
|
currentPlayer = PLAYER_WHITE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEST_ASSERT_TRUE(ist_En_Passaut_erlaubt_Bauer(brett,startX,startY,endX,endY,currentPlayer,anzahl_Zuege,meineHistorie)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 8; i++) { |
|
|
|
|
|
free(brett[i]); |
|
|
|
|
|
} |
|
|
|
|
|
free(brett); |
|
|
|
|
|
|
|
|
// Speicher freigeben |
|
|
// Speicher freigeben |
|
|
for (int i = 0; i < MAX_ZUEGE; i++) { |
|
|
for (int i = 0; i < MAX_ZUEGE; i++) { |
|
@ -39,6 +60,6 @@ void test_En_Passaut_Weiss(void) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
*/ |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // TEST |
|
|
#endif // TEST |