#ifndef __WIZARD_H__
#define __WIZARD_H__
typedefenum{
Menschen,
Elfen,
Zwerge,
Riesen
} nation;
class card
{
int value; //1 - 13: normal, 0: Narr, 14: Zauberer
nation colour;
public:
card(int val, nation n)
{
value=val;
colour=n;
};
int get_value() {return value;};
nation get_colour() {return colour;};
};
class base_table
{
public:
virtualvoid play_card(card *c);
};
class player
{
std::string name;
card *cards[20]; //Handkarten (20 wegen höchstmöglicher Anzahl)
base_table *t;
int tricks; //gemachte Stiche
int guessed; //vorhergesagte Stiche
int points;
public:
virtualvoid play_card();
virtualbool is_ai() {returnfalse;};
virtualvoid guess();
void receive_card(card *c);
void set_table(base_table *tbl) {t=tbl;};
};
class ai_player:public player
{
public:
virtualbool is_ai() {returntrue;};
};
class pile
{
card *cards[60]; //Alle Karten des Spiels
int nocards; //Anzahl der Karten im Stapel
bool unused[60];
public:
void shuffle();
void reinit();
void give_card(player* p, int no);
};
class table:public base_table
{
card *cards[6]; //Es können maximal 6 Karten offen liegen
card *trump; //Trumpfkarte bzw. -farbe
};
class game
{
pile p;
table t;
player players[6]; //Alle mitspielenden Spieler
int numplayers;
public:
void run(void);
};
#endif
The errors:
15 wizard.cpp 'get_colour' has not been declared
15 wizard.cpp request for member of non-aggregate type before '(' token
15 wizard.cpp expected primary-expression before '.' token
The same thing for get_value.
Don't mind the comments, it's german and only for the documentation.