- Added new code for serialization/deserializaiton of full games including initial game and all the player actions.

- Added an undo menu using this code (beware, it's still very very alpha).
- Removed various warning
- Cleaned up avatar loading
- Added full random lists load/save including the deck shuffling (not sure if I could not replace that with seed load/save)
- Moved momir and Co rules configuration out of GameStateDuel
- Create a GameType type to avoid mixing int everywhere
This commit is contained in:
Xawotihs
2011-10-13 19:43:51 +00:00
parent 663058cdab
commit 0b6044551a
28 changed files with 595 additions and 156 deletions

View File

@@ -15,6 +15,10 @@ class Player: public Damageable
{
protected:
ManaPool * manaPool;
JTexture * mAvatarTex;
JQuadPtr mAvatar;
bool loadAvatar(string file, string resName = "playerAvatar");
public:
enum ENUM_PLAY_MODE
@@ -25,8 +29,6 @@ public:
};
string mAvatarName;
JTexture * mAvatarTex;
JQuadPtr mAvatar;
int playMode;
bool nomaxhandsize;
MTGPlayerCards * game;
@@ -35,7 +37,7 @@ public:
string deckFileSmall;
string deckName;
string phaseRing;
int offerInterruptOnPhase;
int offerInterruptOnPhase;
Player(GameObserver *observer, string deckFile, string deckFileSmall, MTGDeck * deck = NULL);
virtual ~Player();
virtual void setObserver(GameObserver*g);
@@ -89,22 +91,18 @@ public:
{
}
void loadAvatar(string file);
/**
** Returns the path to the stats file of currently selected deck.
*/
std::string GetCurrentDeckStatsFile();
bool parseLine(const string& s);
friend ostream& operator<<(ostream&, const Player&);
};
class HumanPlayer: public Player
{
public:
HumanPlayer(GameObserver *observer, string deckFile, string deckFileSmall = "", MTGDeck * deck = NULL);
HumanPlayer(GameObserver *observer, string deckFile, string deckFileSmall, MTGDeck * deck = NULL);
};
ostream& operator<<(ostream&, const Player&);
#endif