X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=TP_13%2Fexo2%2Flib%2Fcoordinates.h;h=c549d2e2a41e2790929f7f39776b368b0bc51c85;hb=9c2b41f4a3539f1087e5560d8ceb301978f8a55b;hp=873d404735e9325853fff3703a8c636df4798520;hpb=5df3071eec60ca43bc66e1266820de0572d4b629;p=TD_C.git diff --git a/TP_13/exo2/lib/coordinates.h b/TP_13/exo2/lib/coordinates.h index 873d404..c549d2e 100644 --- a/TP_13/exo2/lib/coordinates.h +++ b/TP_13/exo2/lib/coordinates.h @@ -19,6 +19,8 @@ #ifndef COORDINATES_H #define COORDINATES_H +#include + /* we only have nine elements in the grid */ #define MAX_COORDINATES 9 @@ -28,8 +30,9 @@ typedef struct coordinates_s { unsigned type; /* 0 = O, 1 = X */ } coordinates_t; -void init_coordinates(coordinates_t* coordinates_array); +void zero_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 */