/** * * @file player.h * @author RUBINI Thomas * @author SIMAILA Djalim * @date January 2022 * @version 1.0 * @brief player data storage * **/ #ifndef GUARD_PLAYER_H #define GUARD_PLAYER_H /*! * @struct Player * @brief player data structure */ struct Player{ /*! * @brief player life points */ unsigned lives = 3; /*! * @brief x coordinate of the player */ unsigned x; /*! * @brief player's unique identidier */ unsigned id; /*! * @brief player's personal score */ unsigned score=0; /*! * @brief counter used for the death animation of players * undefined once the player is eliminated */ unsigned deathAnimCounter=0; /*! * @brief player's shooting cooldown */ unsigned fireCooldown=0; // TODO remove ? bool hasDeathAnimation() const; bool isEliminated() const; bool isPlaying() const; void damage(); }; #endif