28 lines
518 B
C
28 lines
518 B
C
|
/* Holds some useful data about each player
|
||
|
*/
|
||
|
|
||
|
#ifndef _PLAYER_H_
|
||
|
#define _PLAYER_H_
|
||
|
|
||
|
class Player
|
||
|
{
|
||
|
public:
|
||
|
Player(unsigned int colour = 0x000000);
|
||
|
|
||
|
unsigned int get_energy() const { return energy; }
|
||
|
unsigned int get_colour() const { return colour; }
|
||
|
|
||
|
void add_energy(unsigned int amount);
|
||
|
bool spend_energy(unsigned int amount);
|
||
|
|
||
|
bool has_played() const { return played; }
|
||
|
void set_played();
|
||
|
|
||
|
private:
|
||
|
unsigned int energy;
|
||
|
unsigned int colour;
|
||
|
bool played;
|
||
|
};
|
||
|
|
||
|
#endif
|