- reworked the testsuite and the rules (storyflow) to use the same game deserialization code, moved that code to the players and zone classes
- removed every references to the gameobserver singleton. This object can now be instantiated several times as it's needed for minmax. To be able to do that, I mostly added a reference to a gameobserver from any targetable object (cards, players, spells) and abilities.
This commit is contained in:
@@ -108,9 +108,9 @@ class MTGGameZone {
|
||||
|
||||
void setOwner(Player * player);
|
||||
MTGCardInstance * lastCardDrawn;
|
||||
static MTGGameZone * stringToZone(string zoneName, MTGCardInstance * source, MTGCardInstance * target);
|
||||
static MTGGameZone * stringToZone(GameObserver *g, string zoneName, MTGCardInstance * source, MTGCardInstance * target);
|
||||
static int zoneStringToId(string zoneName);
|
||||
static MTGGameZone *intToZone(int zoneId, MTGCardInstance * source = NULL,MTGCardInstance * target = NULL);
|
||||
static MTGGameZone *intToZone(GameObserver *g, int zoneId, MTGCardInstance * source = NULL,MTGCardInstance * target = NULL);
|
||||
static MTGGameZone *intToZone(int zoneId, Player * source, Player * target = NULL);
|
||||
bool needShuffle;
|
||||
virtual const char * getName(){return "zone";};
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
MTGGameZone * temp;
|
||||
|
||||
MTGPlayerCards();
|
||||
MTGPlayerCards(int * idList, int idListSize);
|
||||
MTGPlayerCards(Player*, int * idList, int idListSize);
|
||||
MTGPlayerCards(MTGDeck * deck);
|
||||
~MTGPlayerCards();
|
||||
void initGame(int shuffle = 1, int draw = 1);
|
||||
@@ -200,6 +200,7 @@ public:
|
||||
};
|
||||
|
||||
ostream& operator<<(ostream&, const MTGGameZone&);
|
||||
istream& operator>>(istream&, MTGGameZone&);
|
||||
ostream& operator<<(ostream&, const MTGPlayerCards&);
|
||||
istream& operator>>(istream&, MTGPlayerCards&);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user