2 * =====================================================================================
4 * Filename: coordinates.h
6 * Description: Header for data definition and functions to manipulate elements in the grid
9 * Created: 16/03/2017 19:06:16
13 * Author: Jerome Benoit (fraggle), jerome.benoit@piment-noir.org
14 * Organization: Piment Noir
16 * =====================================================================================
24 /* we only have nine elements in the grid */
25 #define MAX_COORDINATES 9
27 typedef struct coordinates_s
{
30 unsigned type
; /* 0 = O, 1 = X */
33 void zero_coordinates(coordinates_t
* coordinates_array
);
34 coordinates_t
set_coordinates(int y
, int x
, unsigned type
);
35 unsigned add_coordinates(coordinates_t new_coordinates
, coordinates_t
* coordinates_array
, unsigned round
);
36 bool chk_win_conditions(coordinates_t
* coordinates_array
, unsigned round
);
38 #endif /* COORDINATES_H */