#ifndef _player_h
#define _player_h

typedef struct _uselessstats
{
	int raised;
	int spent;
	int produced;
	int killed;
	int lost;
	void reset();
} _uselessstats;

typedef struct _player
{
	bool playing;
	bool everplaying;
	int number;
	int cash;
	int controller;
	int team;
	int32_t tintcolor;
	_unit unit[50];
	string name;
	void reset();
	void clear_units();
	void ready_units();
	void sort_units();
	void mergesort_units(int min, int max);
	void reapply_unitstats();
	bool defeated(int pnum);
	int create_unit(int type, int x, int y, int player);
	int units_in_play();
	_uselessstats stats;
	
	_player();
} _player;

class _character
{
	char *name;
	char *description;
	
	_character(const _character &c);
	_character &operator=(const _character &c);
	
public:
	ol::Bitmap *picture;
	void setname(const char *n);
	void setdescription(const char *d);
	void create(const char *n, const char *d, ol::Bitmap *pic);
	void destroy();
	const char *getname();
	const char *getdescription();

	_character();
  ~_character();
};

#endif
