diff --git a/build/test/out/c/duellist-spielesammlung-projekt.o b/build/test/out/c/duellist-spielesammlung-projekt.o index cbb2064..4c74669 100644 Binary files a/build/test/out/c/duellist-spielesammlung-projekt.o and b/build/test/out/c/duellist-spielesammlung-projekt.o differ diff --git a/build/test/out/test_duellist_spielesammlung_projekt.out b/build/test/out/test_duellist_spielesammlung_projekt.out index 824d61c..3fd72df 100644 Binary files a/build/test/out/test_duellist_spielesammlung_projekt.out and b/build/test/out/test_duellist_spielesammlung_projekt.out differ diff --git a/build/test/results/test_duellist_spielesammlung_projekt.pass b/build/test/results/test_duellist_spielesammlung_projekt.pass deleted file mode 100644 index 43b42bd..0000000 --- a/build/test/results/test_duellist_spielesammlung_projekt.pass +++ /dev/null @@ -1,118 +0,0 @@ ---- -:source: - :path: src/test - :file: test_duellist_spielesammlung_projekt.c -:successes: -- :test: test_coinflip_x_starts - :line: 11 - :message: '' - :unity_test_time: 0 -- :test: test_coinflip_o_starts - :line: 23 - :message: '' - :unity_test_time: 0 -- :test: test_vertical_win - :line: 35 - :message: '' - :unity_test_time: 0 -- :test: test_horizontal_win - :line: 49 - :message: '' - :unity_test_time: 0 -- :test: test_diagonal_win - :line: 62 - :message: '' - :unity_test_time: 0 -- :test: test_valid_move_and_switch - :line: 76 - :message: '' - :unity_test_time: 0 -- :test: test_invalid_input - :line: 92 - :message: '' - :unity_test_time: 0 -- :test: test_valid_input - :line: 106 - :message: '' - :unity_test_time: 0 -- :test: test_invalid_input_negative_row - :line: 121 - :message: '' - :unity_test_time: 0 -- :test: test_invalid_input_overflow_column - :line: 135 - :message: '' - :unity_test_time: 0 -- :test: test_NumberOfMoves_returns_correct_number_of_moves - :line: 149 - :message: '' - :unity_test_time: 0 -- :test: test_BoardFull_returns_false_when_board_is_not_full - :line: 163 - :message: '' - :unity_test_time: 0 -- :test: test_BoardFull_returns_true_when_board_is_full - :line: 176 - :message: '' - :unity_test_time: 0 -- :test: test_CurrentPlayer_returns_correct_player - :line: 189 - :message: '' - :unity_test_time: 0 -- :test: test_FieldEmpty_returns_true_for_empty_field - :line: 202 - :message: '' - :unity_test_time: 0 -- :test: test_FieldEmpty_returns_false_for_nonempty_field - :line: 215 - :message: '' - :unity_test_time: 0 -- :test: test_calculate_mines_HeightWidthOne - :line: 228 - :message: '' - :unity_test_time: 0 -- :test: test_calculate_mines_WidthOne - :line: 242 - :message: '' - :unity_test_time: 0 -- :test: test_calculate_mines_NormalCase - :line: 256 - :message: '' - :unity_test_time: 0 -- :test: test_end_check_AllUncovered_NoMines - :line: 270 - :message: '' - :unity_test_time: 0 -- :test: test_create_minefield_ValidDimensions - :line: 289 - :message: '' - :unity_test_time: 0 -- :test: test_calculate_mines_HeightOne - :line: 314 - :message: '' - :unity_test_time: 0 -- :test: test_create_minefield_NegativeDimensions - :line: 328 - :message: '' - :unity_test_time: 0 -- :test: test_calculate_mines_HeightZero - :line: 342 - :message: '' - :unity_test_time: 0 -- :test: test_calculate_mines_HeightWidthNumber - :line: 356 - :message: '' - :unity_test_time: 0 -- :test: test_calculate_mines_HeightWidthAgan - :line: 370 - :message: '' - :unity_test_time: 0 -:failures: [] -:ignores: [] -:counts: - :total: 26 - :passed: 26 - :failed: 0 - :ignored: 0 -:stdout: [] -:time: 0.05033430000003136 diff --git a/src/main/duellist-spielesammlung-projekt.c b/src/main/duellist-spielesammlung-projekt.c index bac07f6..fd1ccd8 100644 --- a/src/main/duellist-spielesammlung-projekt.c +++ b/src/main/duellist-spielesammlung-projekt.c @@ -8,6 +8,7 @@ #define unknown_character 'x' #define mine_character '@' + int checkAge(int age) { return age >= MIN_AGE ? 1 : 0; } @@ -138,16 +139,17 @@ GameResult checkGameResult(const TicTacToeGame* game) { return draw ? GAME_DRAW : SUCCESS; } + //Nach eingabe zurberechnung der Minen anzahl int calculate_mines(int height, int width) { - int num_mines; + int number_mines; if (height <= 1 || width <= 1) { return 0; } else { - num_mines = ((height * width) / 4); + number_mines = ((height * width) / 4); } - return num_mines; + return number_mines; } //Zum erstellen des Spielfeldes