Browse Source

refactoring : Makierte Kommetar begräzung zwischen dem Spiel Code

remotes/origin/Daniel
Daniel M 11 months ago
parent
commit
b8387c6e9b
  1. BIN
      build/test/out/c/duellist-spielesammlung-projekt.o
  2. BIN
      build/test/out/test_duellist_spielesammlung_projekt.out
  3. 118
      build/test/results/test_duellist_spielesammlung_projekt.pass
  4. 2
      src/main/duellist-spielesammlung-projekt.c

BIN
build/test/out/c/duellist-spielesammlung-projekt.o

BIN
build/test/out/test_duellist_spielesammlung_projekt.out

118
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

2
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) {

Loading…
Cancel
Save