Mosaic
game_ext.h
Go to the documentation of this file.
1
8#ifndef __GAME_EXT_H__
9#define __GAME_EXT_H__
10
11#include <stdbool.h>
12
13#include "game.h"
14
15
19typedef enum
20{
26
47game game_new_ext(uint nb_rows, uint nb_cols, constraint *constraints, color *colors, bool wrapping,
48 neighbourhood neigh);
49
59game game_new_empty_ext(uint nb_rows, uint nb_cols, bool wrapping, neighbourhood neigh);
60
68
76
83
90
101
112
117#endif // __GAME_EXT_H__
Basic Game Functions.
color
Definition: game.h:24
struct game_s * game
The structure pointer that stores the game state.
Definition: game.h:78
unsigned int uint
Standard unsigned integer type.
Definition: game.h:16
const struct game_s * cgame
The structure constant pointer that stores the game state.
Definition: game.h:85
constraint
Definition: game.h:41
uint game_nb_rows(cgame g)
Gets the number of rows (or height).
bool game_is_wrapping(cgame g)
Checks if the game has the wrapping option.
void game_redo(game g)
Redoes the last move.
void game_undo(game g)
Undoes the last move.
neighbourhood game_get_neighbourhood(cgame g)
Gets the neighbourhood option.
uint game_nb_cols(cgame g)
Gets the number of columns (or width).
neighbourhood
The different kind of neighbourhood.
Definition: game_ext.h:20
@ ORTHO
Definition: game_ext.h:22
@ FULL_EXCLUDE
Definition: game_ext.h:23
@ ORTHO_EXCLUDE
Definition: game_ext.h:24
@ FULL
Definition: game_ext.h:21
game game_new_ext(uint nb_rows, uint nb_cols, constraint *constraints, color *colors, bool wrapping, neighbourhood neigh)
Creates a new game with extended options and initializes it.
game game_new_empty_ext(uint nb_rows, uint nb_cols, bool wrapping, neighbourhood neigh)
Creates a new empty game with extended options.