PocketEmpires/Player.h

55 lines
1.3 KiB
C++

#ifndef PLAYER_H__
#define PLAYER_H__
/* **************************************
* Includes *
* **************************************/
#include <stdint.h>
#include "Unit.h"
/* **************************************
* Defines *
* **************************************/
/* **************************************
* Structs and enums *
* **************************************/
/* **************************************
* Class definition *
* **************************************/
class Player
{
public:
enum tResource
{
RESOURCE_TYPE_WOOD,
RESOURCE_TYPE_FOOD,
RESOURCE_TYPE_GOLD,
MAX_RESOURCE_TYPES
};
explicit Player(const char* const strPlayerName);
virtual void drawHandler(void) = 0;
const char* getName(void) {return _name;}
void setName(const char* const strName);
protected:
enum
{
MAX_NAME_LENGTH = 16,
MAX_UNITS = 32
};
void handleUnits(void);
void drawUnits(void);
uint16_t _resourcesMap[MAX_RESOURCE_TYPES];
char _name[MAX_NAME_LENGTH];
Unit _unitsMap[MAX_UNITS];
};
#endif /* PLAYER_H__ */