/* * File: delay.h * Author: Arthur Brandao * * Created on 4 décembre 2018 */ #ifndef DELAY_H #define DELAY_H /* --- Include --- */ #include "constante.h" #include "game.h" /* --- Structure --- */ typedef struct{ int second; //Seconde à attendre int game; //Index de la game dans le tableau int player; //Index du joueur dans le tableau de game int(*callback)(Game*, int); }delay_t; /* --- Fonctions --- */ /** * Attend X secondes (sans bloquer l'execution) avant d'executer le callback * @param int Nombre de second en attente * @param int Index de la game * @param int Index du joueur dans la game * @param int(*)(Game*, int) Le callback */ void delay(int, int, int, int(*)(Game*, int)); int callback_major_end(Game*, int); #endif /* DELAY_H */