Browse Source

istschachmatt Test, Anton Lohrey

remotes/origin/Läufer-fertig,-Hendrik-Voß
fdai7492 11 months ago
parent
commit
5e43b25604
  1. 16
      test/test_Koenig.c

16
test/test_Koenig.c

@ -103,4 +103,20 @@ void test_KoenigKannEntkommen(void) {
TEST_ASSERT_TRUE(KannKoenigEntkommen(testBrett, 4, 4, PLAYER_BLACK));
TEST_ASSERT_FALSE(KannKoenigEntkommen(testBrett, 4, 7, PLAYER_BLACK));
}
void test_KingInCheckmate(void) {
char** testBrett = Schachbrett_erstellen();
testBrett[4][4] = 'K';
TEST_ASSERT_FALSE(istSchachmatt(testBrett, 4, 4 ,PLAYER_WHITE));
testBrett[4][0] = 'q';
testBrett[5][0] = 'q';
TEST_ASSERT_FALSE(istSchachmatt(testBrett, 4, 4 ,PLAYER_WHITE));
testBrett[3][0] = 'q';
testBrett[3][7] = 'q';
testBrett[4][7] = 'q';
testBrett[5][7] = 'q';
testBrett[7][4] = ' ';
print_Schachfeld(testBrett);
TEST_ASSERT_TRUE(istSchachmatt(testBrett, 4, 4 ,PLAYER_WHITE));
}
#endif // TEST
|||||||
100:0
Loading…
Cancel
Save