|
|
@ -55,6 +55,56 @@ void test_Dame_positive_horizontal_Bewegung(void) { |
|
|
|
free(brett); |
|
|
|
} |
|
|
|
|
|
|
|
void test_Dame_vertikal_Links_Bewegung(void) { |
|
|
|
|
|
|
|
char** brett = Schachbrett_erstellen(); |
|
|
|
int startX = 6; |
|
|
|
int startY = 3; |
|
|
|
int endX = 4; |
|
|
|
int endY = 3; |
|
|
|
Player player = PLAYER_WHITE; |
|
|
|
|
|
|
|
|
|
|
|
TEST_ASSERT_NOT_NULL(brett); |
|
|
|
|
|
|
|
brett[3][6] = 'Q'; |
|
|
|
print_Schachfeld(brett); |
|
|
|
|
|
|
|
|
|
|
|
TEST_ASSERT_TRUE(istzugerlaubt_Dame( brett, startX, startY, endX, endY, player)); |
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 8; i++) { |
|
|
|
free(brett[i]); |
|
|
|
} |
|
|
|
free(brett); |
|
|
|
} |
|
|
|
|
|
|
|
void test_Dame_vertikal_Rechts_Bewegung(void) { |
|
|
|
|
|
|
|
char** brett = Schachbrett_erstellen(); |
|
|
|
int startX = 3; |
|
|
|
int startY = 3; |
|
|
|
int endX = 6; |
|
|
|
int endY = 3; |
|
|
|
Player player = PLAYER_WHITE; |
|
|
|
|
|
|
|
|
|
|
|
TEST_ASSERT_NOT_NULL(brett); |
|
|
|
|
|
|
|
brett[3][3] = 'Q'; |
|
|
|
print_Schachfeld(brett); |
|
|
|
|
|
|
|
|
|
|
|
TEST_ASSERT_TRUE(istzugerlaubt_Dame( brett, startX, startY, endX, endY, player)); |
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 8; i++) { |
|
|
|
free(brett[i]); |
|
|
|
} |
|
|
|
free(brett); |
|
|
|
} |
|
|
|
|
|
|
|
void test_Dame_Falsche_Bewegung(void) { |
|
|
|
|
|
|
|
char** brett = Schachbrett_erstellen(); |
|
|
|