|
@ -5,6 +5,7 @@ |
|
|
#include <stdbool.h> |
|
|
#include <stdbool.h> |
|
|
#include "Spieler.h" |
|
|
#include "Spieler.h" |
|
|
#include "Koenig.h" |
|
|
#include "Koenig.h" |
|
|
|
|
|
#include "Schachbrett.h" |
|
|
|
|
|
|
|
|
char** ErstelleTestBrett() { |
|
|
char** ErstelleTestBrett() { |
|
|
char** Brett = malloc(8 * sizeof(char*)); |
|
|
char** Brett = malloc(8 * sizeof(char*)); |
|
@ -165,6 +166,7 @@ void test_GreiftKoenigAn(void) { |
|
|
void test_istFeldUnsicher(void) { |
|
|
void test_istFeldUnsicher(void) { |
|
|
char** Brett = ErstelleTestBrett(); |
|
|
char** Brett = ErstelleTestBrett(); |
|
|
Brett[4][4] = 'p'; |
|
|
Brett[4][4] = 'p'; |
|
|
|
|
|
Player player = PLAYER_WHITE; |
|
|
print_Schachfeld(Brett); |
|
|
print_Schachfeld(Brett); |
|
|
TEST_ASSERT_TRUE(istFeldUnsicher(Brett, 5, 3, player)); |
|
|
TEST_ASSERT_TRUE(istFeldUnsicher(Brett, 5, 3, player)); |
|
|
TEST_ASSERT_FALSE(istFeldUnsicher(Brett, 0, 0, player)); |
|
|
TEST_ASSERT_FALSE(istFeldUnsicher(Brett, 0, 0, player)); |
|
|