#ifndef _QUOR_PLAYER_H_ #define _QUOR_PLAYER_H_ #include "move.h" #include "graph.h" /* Access to player informations * RETURNS: * - the player name as an [a-zA-Z0-9 -_]* string */ char const* get_player_name(); /* Player initialization * PARAM: * - id : the color assigned to the player * - graph : the graph where the game is played * - num_walls : the number of walls assigned to the player * PRECOND: * - `id` is either BLACK or WHITE * - `graph` is a heap-allocated copy of the graph where the game is * played, that must be freed in the end * - `num_walls` is the number of edges of `graph` divided by 15, rounded up * - initialize has never been called before */ void initialize(enum color_t id, struct graph_t* graph, size_t num_walls); /* Computes next move * PARAM: * - previous_move: the move from the previous player * RETURNS: * - the next move for the player. */ struct move_t play(struct move_t previous_move); /* Announces the end of the game to the player, and cleans up the memory he may have been using. * POSTCOND: * - every allocation done during the calls to initialize and play * functions must have been freed */ void finalize(); #endif // _QUOR_PLAYER_H_