diff --git a/build/test/out/c/duellist-spielesammlung-projekt.o b/build/test/out/c/duellist-spielesammlung-projekt.o index 4c74669..c49dce1 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 3fd72df..5b310fa 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 new file mode 100644 index 0000000..32b3be9 --- /dev/null +++ b/build/test/results/test_duellist_spielesammlung_projekt.pass @@ -0,0 +1,118 @@ +--- +: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.05030940000051487 diff --git a/src/main/duellist-spielesammlung-projekt.c b/src/main/duellist-spielesammlung-projekt.c index fd1ccd8..581eb41 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 '@' +/*--------------------TicTacTo--------------------*/ int checkAge(int age) { return age >= MIN_AGE ? 1 : 0; @@ -139,6 +140,7 @@ GameResult checkGameResult(const TicTacToeGame* game) { return draw ? GAME_DRAW : SUCCESS; } +/*--------------------Minsweeper--------------------*/ //Nach eingabe zurberechnung der Minen anzahl int calculate_mines(int height, int width) {