|
@ -36,7 +36,30 @@ void test_Turm_Y_Bewegung(void) { |
|
|
free(brett); |
|
|
free(brett); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_Turm_X_Bewegung(void) { |
|
|
|
|
|
|
|
|
|
|
|
char** brett = Schachbrett_erstellen(); |
|
|
|
|
|
int startX = 0; |
|
|
|
|
|
int startY = 2; |
|
|
|
|
|
int endX = 4; |
|
|
|
|
|
int endY = 2; |
|
|
|
|
|
Player player = PLAYER_WHITE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEST_ASSERT_NOT_NULL(brett); |
|
|
|
|
|
|
|
|
|
|
|
brett[2][0] = 'R'; |
|
|
|
|
|
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 |
|
|
|
|
|
|
|
|