8#ifndef SERVER_HANDLER_H
9 #define SERVER_HANDLER_H
11 #include <sys/select.h>
157static const cli_t DEFAULT_CLIENT = {
164 { 0, 0, 0, 0, 0, 0, 0},
int server_initialization(server_handler_t *server, struct arg_s **arguments)
The function to initialize every server data.
void server_loop(server_handler_t *server)
The server loop where communication client/server can be done.
enum ressources_type_s ressources_type_t
struct server_handler_s server_handler_t
A structure to store server general data.
enum direction_s direction_t
struct ressources_s ressources_t
A structure to count ressources in the game.
struct team_s team_t
A structure to store every team data.
int init_game_data(server_handler_t *server, struct arg_s **arguments)
The function to initialize every game data.
struct game_data_s game_data_t
A structure to store the game data.
struct cli_s cli_t
A structure to store every client/player data.
void command_handling(server_handler_t *server, const int fd)
Handle client message/command.
struct map_s map_t
A structure to store every tiles content (Must be an 2D array)
A structure to store every client/player data.
A structure to store the game data.
ressources_t total_ressources
cli_t clients[MAX_CLIENT]
ressources_t ressources_quantity
A structure to store every tiles content (Must be an 2D array)
A structure to count ressources in the game.
A structure to store server general data.
A structure to store every team data.
int client_num_list[MAX_CLIENT]