Robot Devastation
|
Class that represents a player of this game, with a 'unique' id, name, health, team id and score.
#include <Player.hpp>
Public Member Functions | |
Player () | |
Constructs a default, dummy player. (That is invalid for the game, by the way) | |
Player (int id, const std::string &name, int health, int max_health, int team_id, int score) | |
int | getId () const |
void | setId (int value) |
const std::string & | getName () const |
void | setName (const std::string &value) |
int | getHealth () const |
void | setHealth (int value) |
bool | getDamageFromWeapon (const Weapon &weapon) |
Reduces this player's health by an amount specified by the weapon used. | |
int | getMaxHealth () const |
void | setMaxHealth (int value) |
int | getTeamId () const |
void | setTeamId (int value) |
int | getScore () const |
void | setScore (int value) |
std::string | str () const |
Returns a string representing this object. | |
Private Attributes | |
std::string | name |
int | id |
int | health |
int | max_health |
int | team_id |
int | score |