|
@ -5,6 +5,30 @@ |
|
|
#include "Dame.h" |
|
|
#include "Dame.h" |
|
|
#include <stdlib.h> |
|
|
#include <stdlib.h> |
|
|
|
|
|
|
|
|
|
|
|
void test_Dame_positive_horizontal_Bewegung(void) { |
|
|
|
|
|
|
|
|
|
|
|
char** brett = Schachbrett_erstellen(); |
|
|
|
|
|
int startX = 3; |
|
|
|
|
|
int startY = 2; |
|
|
|
|
|
int endX = 3; |
|
|
|
|
|
int endY = 4; |
|
|
|
|
|
Player player = PLAYER_WHITE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEST_ASSERT_NOT_NULL(brett); |
|
|
|
|
|
|
|
|
|
|
|
brett[2][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) { |
|
|
void test_Dame_Falsche_Bewegung(void) { |
|
|
|
|
|
|
|
|