|
@ -38,6 +38,8 @@ void test_Turm_Y_Bewegung(void) { |
|
|
free(brett); |
|
|
free(brett); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_Turm_X_Bewegung(void) { |
|
|
void test_Turm_X_Bewegung(void) { |
|
|
|
|
|
|
|
|
char** brett = Schachbrett_erstellen(); |
|
|
char** brett = Schachbrett_erstellen(); |
|
@ -88,6 +90,31 @@ void test_Turm_negative_Y_Bewegung(void) { |
|
|
free(brett); |
|
|
free(brett); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_Turm_Falsche_Bewegung(void) { |
|
|
|
|
|
|
|
|
|
|
|
char** brett = Schachbrett_erstellen(); |
|
|
|
|
|
int startX = 0; |
|
|
|
|
|
int startY = 0; |
|
|
|
|
|
int endX = 1; |
|
|
|
|
|
int endY = 3; |
|
|
|
|
|
Player player = PLAYER_WHITE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEST_ASSERT_NOT_NULL(brett); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print_Schachfeld(brett); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEST_ASSERT_FALSE(istzugerlaubt_Turm( brett, startX, startY, endX, endY, player)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 8; i++) { |
|
|
|
|
|
free(brett[i]); |
|
|
|
|
|
} |
|
|
|
|
|
free(brett); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
#endif // TEST |
|
|
#endif // TEST |
|
|
|
|
|
|
|
|
|
|
|
|
|
|