diff --git a/build/test/cache/test_Spiellogik.c b/build/test/cache/test_Spiellogik.c index 9764754..5ce3638 100644 --- a/build/test/cache/test_Spiellogik.c +++ b/build/test/cache/test_Spiellogik.c @@ -78,6 +78,10 @@ void test_feldFrei_Verhalten_bei_freiem_Feld(void){ + + + + void test_lose_up_freiesFeld(void){ int realU[20][20] = { 0 }; @@ -92,12 +96,14 @@ void test_lose_up_freiesFeld(void){ ((void *)0) - ), (UNITY_UINT)(41), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(43), UNITY_DISPLAY_STYLE_INT); } + + void test_lose_up_belegtesFeld(void){ int realU[20][20] = { 0 }; @@ -114,12 +120,16 @@ void test_lose_up_belegtesFeld(void){ ((void *)0) - ), (UNITY_UINT)(50), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(53), UNITY_DISPLAY_STYLE_INT); } + + + + void test_lose_up_Obererrand(void){ int realU[20][20] = { 0 }; @@ -134,7 +144,7 @@ void test_lose_up_Obererrand(void){ ((void *)0) - ), (UNITY_UINT)(58), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(63), UNITY_DISPLAY_STYLE_INT); } @@ -142,6 +152,8 @@ void test_lose_up_Obererrand(void){ + + void test_lose_down_freiesFeld(void){ int realU[20][20] = { 0 }; @@ -156,12 +168,16 @@ void test_lose_down_freiesFeld(void){ ((void *)0) - ), (UNITY_UINT)(67), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(73), UNITY_DISPLAY_STYLE_INT); } + + + + void test_lose_down_belegtesFeld(void){ int realU[20][20] = { 0 }; @@ -178,7 +194,7 @@ void test_lose_down_belegtesFeld(void){ ((void *)0) - ), (UNITY_UINT)(76), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(84), UNITY_DISPLAY_STYLE_INT); } @@ -202,12 +218,16 @@ void test_lose_left_freiesFeld(void){ ((void *)0) - ), (UNITY_UINT)(86), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(94), UNITY_DISPLAY_STYLE_INT); } + + + + void test_lose_left_belegtesFeld(void){ int realU[20][20] = { 0 }; @@ -224,12 +244,16 @@ void test_lose_left_belegtesFeld(void){ ((void *)0) - ), (UNITY_UINT)(95), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(105), UNITY_DISPLAY_STYLE_INT); } + + + + void test_lose_left_linkerRand(void){ int realU[20][20] = { 0 }; @@ -244,7 +268,7 @@ void test_lose_left_linkerRand(void){ ((void *)0) - ), (UNITY_UINT)(103), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(115), UNITY_DISPLAY_STYLE_INT); } @@ -252,6 +276,8 @@ void test_lose_left_linkerRand(void){ + + void test_lose_right_freiesFeld(void){ int realU[20][20] = { 0 }; @@ -266,12 +292,16 @@ void test_lose_right_freiesFeld(void){ ((void *)0) - ), (UNITY_UINT)(112), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(125), UNITY_DISPLAY_STYLE_INT); } + + + + void test_lose_right_belegtesFeld(void){ int realU[20][20] = { 0 }; @@ -288,10 +318,16 @@ void test_lose_right_belegtesFeld(void){ ((void *)0) - ), (UNITY_UINT)(121), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(136), UNITY_DISPLAY_STYLE_INT); } + + + + + + void test_lose_right_rechterRand(void){ int realU[20][20] = { 0 }; @@ -306,6 +342,6 @@ void test_lose_right_rechterRand(void){ ((void *)0) - ), (UNITY_UINT)(128), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(146), UNITY_DISPLAY_STYLE_INT); } diff --git a/build/test/out/c/test_Spiellogik.o b/build/test/out/c/test_Spiellogik.o index 1be7e69..adae988 100644 Binary files a/build/test/out/c/test_Spiellogik.o and b/build/test/out/c/test_Spiellogik.o differ diff --git a/build/test/out/c/test_Spiellogik_runner.o b/build/test/out/c/test_Spiellogik_runner.o index e2376e3..87299cf 100644 Binary files a/build/test/out/c/test_Spiellogik_runner.o and b/build/test/out/c/test_Spiellogik_runner.o differ diff --git a/build/test/out/test_Spiellogik.out b/build/test/out/test_Spiellogik.out index a9f8db7..fc9c9f4 100755 Binary files a/build/test/out/test_Spiellogik.out and b/build/test/out/test_Spiellogik.out differ diff --git a/build/test/preprocess/files/test_Spiellogik.c b/build/test/preprocess/files/test_Spiellogik.c index 9764754..5ce3638 100644 --- a/build/test/preprocess/files/test_Spiellogik.c +++ b/build/test/preprocess/files/test_Spiellogik.c @@ -78,6 +78,10 @@ void test_feldFrei_Verhalten_bei_freiem_Feld(void){ + + + + void test_lose_up_freiesFeld(void){ int realU[20][20] = { 0 }; @@ -92,12 +96,14 @@ void test_lose_up_freiesFeld(void){ ((void *)0) - ), (UNITY_UINT)(41), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(43), UNITY_DISPLAY_STYLE_INT); } + + void test_lose_up_belegtesFeld(void){ int realU[20][20] = { 0 }; @@ -114,12 +120,16 @@ void test_lose_up_belegtesFeld(void){ ((void *)0) - ), (UNITY_UINT)(50), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(53), UNITY_DISPLAY_STYLE_INT); } + + + + void test_lose_up_Obererrand(void){ int realU[20][20] = { 0 }; @@ -134,7 +144,7 @@ void test_lose_up_Obererrand(void){ ((void *)0) - ), (UNITY_UINT)(58), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(63), UNITY_DISPLAY_STYLE_INT); } @@ -142,6 +152,8 @@ void test_lose_up_Obererrand(void){ + + void test_lose_down_freiesFeld(void){ int realU[20][20] = { 0 }; @@ -156,12 +168,16 @@ void test_lose_down_freiesFeld(void){ ((void *)0) - ), (UNITY_UINT)(67), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(73), UNITY_DISPLAY_STYLE_INT); } + + + + void test_lose_down_belegtesFeld(void){ int realU[20][20] = { 0 }; @@ -178,7 +194,7 @@ void test_lose_down_belegtesFeld(void){ ((void *)0) - ), (UNITY_UINT)(76), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(84), UNITY_DISPLAY_STYLE_INT); } @@ -202,12 +218,16 @@ void test_lose_left_freiesFeld(void){ ((void *)0) - ), (UNITY_UINT)(86), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(94), UNITY_DISPLAY_STYLE_INT); } + + + + void test_lose_left_belegtesFeld(void){ int realU[20][20] = { 0 }; @@ -224,12 +244,16 @@ void test_lose_left_belegtesFeld(void){ ((void *)0) - ), (UNITY_UINT)(95), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(105), UNITY_DISPLAY_STYLE_INT); } + + + + void test_lose_left_linkerRand(void){ int realU[20][20] = { 0 }; @@ -244,7 +268,7 @@ void test_lose_left_linkerRand(void){ ((void *)0) - ), (UNITY_UINT)(103), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(115), UNITY_DISPLAY_STYLE_INT); } @@ -252,6 +276,8 @@ void test_lose_left_linkerRand(void){ + + void test_lose_right_freiesFeld(void){ int realU[20][20] = { 0 }; @@ -266,12 +292,16 @@ void test_lose_right_freiesFeld(void){ ((void *)0) - ), (UNITY_UINT)(112), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(125), UNITY_DISPLAY_STYLE_INT); } + + + + void test_lose_right_belegtesFeld(void){ int realU[20][20] = { 0 }; @@ -288,10 +318,16 @@ void test_lose_right_belegtesFeld(void){ ((void *)0) - ), (UNITY_UINT)(121), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(136), UNITY_DISPLAY_STYLE_INT); } + + + + + + void test_lose_right_rechterRand(void){ int realU[20][20] = { 0 }; @@ -306,6 +342,6 @@ void test_lose_right_rechterRand(void){ ((void *)0) - ), (UNITY_UINT)(128), UNITY_DISPLAY_STYLE_INT); + ), (UNITY_UINT)(146), UNITY_DISPLAY_STYLE_INT); } diff --git a/build/test/results/test_Spiellogik.pass b/build/test/results/test_Spiellogik.pass index f57fad2..d5dd92f 100644 --- a/build/test/results/test_Spiellogik.pass +++ b/build/test/results/test_Spiellogik.pass @@ -16,47 +16,47 @@ :message: '' :unity_test_time: 0 - :test: test_lose_up_freiesFeld - :line: 36 + :line: 38 :message: '' :unity_test_time: 0 - :test: test_lose_up_belegtesFeld - :line: 44 + :line: 47 :message: '' :unity_test_time: 0 - :test: test_lose_up_Obererrand - :line: 53 + :line: 58 :message: '' :unity_test_time: 0 - :test: test_lose_down_freiesFeld - :line: 62 + :line: 68 :message: '' :unity_test_time: 0 - :test: test_lose_down_belegtesFeld - :line: 70 + :line: 78 :message: '' :unity_test_time: 0 - :test: test_lose_left_freiesFeld - :line: 81 + :line: 89 :message: '' :unity_test_time: 0 - :test: test_lose_left_belegtesFeld - :line: 89 + :line: 99 :message: '' :unity_test_time: 0 - :test: test_lose_left_linkerRand - :line: 98 + :line: 110 :message: '' :unity_test_time: 0 - :test: test_lose_right_freiesFeld - :line: 107 + :line: 120 :message: '' :unity_test_time: 0 - :test: test_lose_right_belegtesFeld - :line: 115 + :line: 130 :message: '' :unity_test_time: 0 - :test: test_lose_right_rechterRand - :line: 123 + :line: 141 :message: '' :unity_test_time: 0 :failures: [] @@ -67,4 +67,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.0020299840016377857 +:time: 0.000997625000309199 diff --git a/build/test/results/test_Umgebung.pass b/build/test/results/test_Umgebung.pass index 5925f89..2923dbb 100644 --- a/build/test/results/test_Umgebung.pass +++ b/build/test/results/test_Umgebung.pass @@ -19,4 +19,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.0014718490001541795 +:time: 0.0012777290012309095 diff --git a/build/test/results/test_test.pass b/build/test/results/test_test.pass index c57278f..c51756b 100644 --- a/build/test/results/test_test.pass +++ b/build/test/results/test_test.pass @@ -15,4 +15,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.0013736040000367211 +:time: 0.0011423740015743533 diff --git a/build/test/runners/test_Spiellogik_runner.c b/build/test/runners/test_Spiellogik_runner.c index cd6f2e8..4db60cb 100644 --- a/build/test/runners/test_Spiellogik_runner.c +++ b/build/test/runners/test_Spiellogik_runner.c @@ -91,17 +91,17 @@ int main(void) run_test(test_test1, "test_test1", 12); run_test(test_feldFrei_Verhalten_bei_belegtem_Feld, "test_feldFrei_Verhalten_bei_belegtem_Feld", 19); run_test(test_feldFrei_Verhalten_bei_freiem_Feld, "test_feldFrei_Verhalten_bei_freiem_Feld", 27); - run_test(test_lose_up_freiesFeld, "test_lose_up_freiesFeld", 36); - run_test(test_lose_up_belegtesFeld, "test_lose_up_belegtesFeld", 44); - run_test(test_lose_up_Obererrand, "test_lose_up_Obererrand", 53); - run_test(test_lose_down_freiesFeld, "test_lose_down_freiesFeld", 62); - run_test(test_lose_down_belegtesFeld, "test_lose_down_belegtesFeld", 70); - run_test(test_lose_left_freiesFeld, "test_lose_left_freiesFeld", 81); - run_test(test_lose_left_belegtesFeld, "test_lose_left_belegtesFeld", 89); - run_test(test_lose_left_linkerRand, "test_lose_left_linkerRand", 98); - run_test(test_lose_right_freiesFeld, "test_lose_right_freiesFeld", 107); - run_test(test_lose_right_belegtesFeld, "test_lose_right_belegtesFeld", 115); - run_test(test_lose_right_rechterRand, "test_lose_right_rechterRand", 123); + run_test(test_lose_up_freiesFeld, "test_lose_up_freiesFeld", 38); + run_test(test_lose_up_belegtesFeld, "test_lose_up_belegtesFeld", 47); + run_test(test_lose_up_Obererrand, "test_lose_up_Obererrand", 58); + run_test(test_lose_down_freiesFeld, "test_lose_down_freiesFeld", 68); + run_test(test_lose_down_belegtesFeld, "test_lose_down_belegtesFeld", 78); + run_test(test_lose_left_freiesFeld, "test_lose_left_freiesFeld", 89); + run_test(test_lose_left_belegtesFeld, "test_lose_left_belegtesFeld", 99); + run_test(test_lose_left_linkerRand, "test_lose_left_linkerRand", 110); + run_test(test_lose_right_freiesFeld, "test_lose_right_freiesFeld", 120); + run_test(test_lose_right_belegtesFeld, "test_lose_right_belegtesFeld", 130); + run_test(test_lose_right_rechterRand, "test_lose_right_rechterRand", 141); return UnityEnd(); } diff --git a/src/Spiellogik.h b/src/Spiellogik.h index 54eed4d..e676795 100644 --- a/src/Spiellogik.h +++ b/src/Spiellogik.h @@ -4,6 +4,7 @@ #define N 20 int probe(int input); +int win(realU[N][N]); int feldFrei(int realU[N][N], int ii, int jj); int lose(int realU[N][N], char richtung);