5 #ifndef __RD_PLAYER_HPP__
6 #define __RD_PLAYER_HPP__
26 Player(
int id,
const std::string & name,
int health,
int max_health,
int team_id,
int score);
29 void setId(
int value);
31 const std::string & getName()
const;
32 void setName(
const std::string &value);
34 int getHealth()
const;
35 void setHealth(
int value);
40 int getMaxHealth()
const;
41 void setMaxHealth(
int value);
43 int getTeamId()
const;
44 void setTeamId(
int value);
47 void setScore(
int value);
50 std::string
str()
const;
63 #endif //__RD_PLAYER_HPP__
Class that represents a player of this game, with a 'unique' id, name, health, team id and score.
Definition: Player.hpp:21
The main, catch-all namespace for Robot Devastation.
Definition: groups.dox:4
Class that represents a weapon.
Definition: Weapon.hpp:22
std::string str() const
Returns a string representing this object.
Definition: Player.cpp:98
Player()
Constructs a default, dummy player. (That is invalid for the game, by the way)
Definition: Player.cpp:9
bool getDamageFromWeapon(const Weapon &weapon)
Reduces this player's health by an amount specified by the weapon used.
Definition: Player.cpp:60