TP 13 exo2: Robustify the current tic-tac-toe implementation
[TD_C.git] / TP_13 / exo2 / lib / coordinates.h
index 873d404735e9325853fff3703a8c636df4798520..e236e3b75d7d634914c35a3c0f53e0ce812b0a12 100644 (file)
@@ -19,6 +19,8 @@
 #ifndef COORDINATES_H
 #define COORDINATES_H
 
+#include <stdbool.h>
+
 /* we only have nine elements in the grid */
 #define MAX_COORDINATES 9
 
@@ -29,7 +31,9 @@ typedef struct coordinates_s {
 } coordinates_t;
 
 void init_coordinates(coordinates_t* coordinates_array);
+void reinit_coordinates(coordinates_t* coordinates_array);
 coordinates_t set_coordinates(int y, int x, unsigned type);
-unsigned add_coordinates(coordinates_t new_coordinates, coordinates_t* coordinates_array);
+unsigned add_coordinates(coordinates_t new_coordinates, coordinates_t* coordinates_array, unsigned round);
+bool chk_win_conditions(coordinates_t* coordinates_array, unsigned round);
 
 #endif /* COORDINATES_H */