You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
730 B

  1. #ifdef TEST
  2. #include "unity.h"
  3. #include "Schachbrett.h"
  4. #include "Spieler.h"
  5. #include "Bauer.h"
  6. #include "Turm.h"
  7. #include "Laeufer.h"
  8. #include "Dame.h"
  9. #include "Springer.h"
  10. #include "Koenig.h"
  11. #include "Moving.h"
  12. #include "SimpleKI.h"
  13. #include <stdlib.h>
  14. void test_KI_Bewegung (void) {
  15. char** brett = Schachbrett_erstellen();
  16. char** ver_brett = Schachbrett_erstellen();
  17. int startX = 1;
  18. int startY = 1;
  19. int endX = 2;
  20. int endY = 1;
  21. Player player = PLAYER_BLACK;
  22. TEST_ASSERT_NOT_NULL(brett);
  23. kuenstliche_intelligenz(brett, player);
  24. TEST_ASSERT_FALSE(brett == ver_brett);
  25. for (int i = 0; i < 8; i++) {
  26. free(brett[i]);
  27. }
  28. free(brett);
  29. }
  30. #endif // TEST