Browse Source

Kleiner X-Y fix links ist Y, Luis Hahn

remotes/origin/Läufer-fertig,-Hendrik-Voß
Luis Hahn 11 months ago
parent
commit
5b747a24e8
  1. 12
      build/test/cache/test_Moving.c
  2. BIN
      build/test/out/c/Moving.o
  3. BIN
      build/test/out/c/test_Moving.o
  4. BIN
      build/test/out/test_Moving.out
  5. 12
      build/test/preprocess/files/test_Moving.c
  6. 2
      build/test/results/test_Input.pass
  7. 12
      build/test/results/test_Moving.pass
  8. 2
      build/test/results/test_Schachbrett.pass
  9. 4
      src/Moving.c
  10. 6
      test/test_Moving.c

12
build/test/cache/test_Moving.c

@ -48,17 +48,21 @@ void test_Bauern_bewegen(void) {
UnityAssertEqualNumber((UNITY_INT)(('P')), (UNITY_INT)((brett[0][2])), (
print_Schachfeld(brett,8,8);
UnityAssertEqualNumber((UNITY_INT)(('P')), (UNITY_INT)((brett[2][0])), (
((void *)0) ((void *)0)
), (UNITY_UINT)(26), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(28), UNITY_DISPLAY_STYLE_INT);
UnityAssertEqualNumber((UNITY_INT)((' ')), (UNITY_INT)((brett[0][1])), (
UnityAssertEqualNumber((UNITY_INT)((' ')), (UNITY_INT)((brett[1][0])), (
((void *)0) ((void *)0)
), (UNITY_UINT)(27), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(29), UNITY_DISPLAY_STYLE_INT);

BIN
build/test/out/c/Moving.o

BIN
build/test/out/c/test_Moving.o

BIN
build/test/out/test_Moving.out

12
build/test/preprocess/files/test_Moving.c

@ -48,17 +48,21 @@ void test_Bauern_bewegen(void) {
UnityAssertEqualNumber((UNITY_INT)(('P')), (UNITY_INT)((brett[0][2])), (
print_Schachfeld(brett,8,8);
UnityAssertEqualNumber((UNITY_INT)(('P')), (UNITY_INT)((brett[2][0])), (
((void *)0) ((void *)0)
), (UNITY_UINT)(26), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(28), UNITY_DISPLAY_STYLE_INT);
UnityAssertEqualNumber((UNITY_INT)((' ')), (UNITY_INT)((brett[0][1])), (
UnityAssertEqualNumber((UNITY_INT)((' ')), (UNITY_INT)((brett[1][0])), (
((void *)0) ((void *)0)
), (UNITY_UINT)(27), UNITY_DISPLAY_STYLE_INT);
), (UNITY_UINT)(29), UNITY_DISPLAY_STYLE_INT);

2
build/test/results/test_Input.pass

@ -16,4 +16,4 @@
:ignored: 0 :ignored: 0
:stdout: :stdout:
- "-> " - "-> "
:time: 0.035566499980632216
:time: 0.05769519996829331

12
build/test/results/test_Moving.pass

@ -14,5 +14,13 @@
:passed: 1 :passed: 1
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: []
:time: 0.032800800050608814
:stdout:
- " R N B Q K B N R "
- " P P P P P P P "
- " P "
- " "
- " "
- " "
- " p p p p p p p p "
- " r n b q k b n r "
:time: 0.06610940000973642

2
build/test/results/test_Schachbrett.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.033765100000891834
:time: 0.0358981000026688

4
src/Moving.c

@ -17,7 +17,7 @@ void machezug(char** Brett, int startX, int startY, int endX, int endY,Player pl
//wenn istzugerlaubt true ist wird das hier ausgeführt //wenn istzugerlaubt true ist wird das hier ausgeführt
if(istzugerlaubt(Brett,startX,startY,endX,endY,player) == true){ if(istzugerlaubt(Brett,startX,startY,endX,endY,player) == true){
Brett[endX][endY] = Brett[startY][startX];
Brett[startX][startY] = ' ';
Brett[endY][endX] = Brett[startY][startX];
Brett[startY][startX] = ' ';
} }
} }

6
test/test_Moving.c

@ -23,8 +23,10 @@ void test_Bauern_bewegen(void) {
machezug( brett, startX, startY, endX, endY, player); machezug( brett, startX, startY, endX, endY, player);
TEST_ASSERT_EQUAL('P', brett[0][2]);
TEST_ASSERT_EQUAL(' ', brett[0][1]);
print_Schachfeld(brett,8,8);
TEST_ASSERT_EQUAL('P', brett[2][0]);
TEST_ASSERT_EQUAL(' ', brett[1][0]);
for (int i = 0; i < 8; i++) { for (int i = 0; i < 8; i++) {

Loading…
Cancel
Save