|
|
@ -3,7 +3,10 @@ |
|
|
|
|
|
|
|
#define MIN_AGE 12 |
|
|
|
|
|
|
|
|
|
|
|
#define max_height 10 |
|
|
|
#define max_width 10 |
|
|
|
#define unknown_character 'x' |
|
|
|
#define mine_character '@' |
|
|
|
|
|
|
|
typedef enum { |
|
|
|
SUCCESS, |
|
|
@ -19,13 +22,11 @@ typedef enum { |
|
|
|
PLAYER_O |
|
|
|
} Player; |
|
|
|
|
|
|
|
|
|
|
|
typedef struct { |
|
|
|
Player board[3][3]; // Spielfeld |
|
|
|
Player currentPlayer; // Aktueller Spieler |
|
|
|
} TicTacToeGame; |
|
|
|
|
|
|
|
|
|
|
|
GameResult makeMove(TicTacToeGame* game, int row, int col); |
|
|
|
GameResult checkGameResult(const TicTacToeGame* game); |
|
|
|
GameResult initializeGame(TicTacToeGame* game); |
|
|
@ -38,15 +39,6 @@ int FieldEmpty(const TicTacToeGame* game, int row, int col); |
|
|
|
int decideGameType(); |
|
|
|
Player playRockPaperScissors(); |
|
|
|
|
|
|
|
#include <stdio.h> |
|
|
|
#include <stdlib.h> |
|
|
|
#include <time.h> |
|
|
|
|
|
|
|
#define max_height 10 |
|
|
|
#define max_width 10 |
|
|
|
#define unknown_character 'x' |
|
|
|
#define mine_character '@' |
|
|
|
|
|
|
|
int end_check(char** minefield, char** mines, int height, int width); |
|
|
|
int field_check(char** minefield, char** mines, int height, int width, int row, int column); |
|
|
|
void show_minefield(char** minefield, int height, int width); |
|
|
|