- 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:
@@ -88,7 +88,7 @@ public:
|
||||
virtual int receiveEvent(WEvent * event);
|
||||
virtual void Render();
|
||||
|
||||
AIPlayer(string deckFile, string deckFileSmall, MTGDeck * deck = NULL);
|
||||
AIPlayer(GameObserver *observer, string deckFile, string deckFileSmall, MTGDeck * deck = NULL);
|
||||
virtual ~AIPlayer();
|
||||
|
||||
virtual int chooseTarget(TargetChooser * tc = NULL, Player * forceTarget = NULL, MTGCardInstance * Chosencard = NULL, bool checkonly = false) = 0;
|
||||
@@ -105,9 +105,9 @@ public:
|
||||
|
||||
class AIPlayerFactory{
|
||||
public:
|
||||
AIPlayer * createAIPlayer(MTGAllCards * collection, Player * opponent, int deckid = 0);
|
||||
AIPlayer * createAIPlayer(GameObserver *observer, MTGAllCards * collection, Player * opponent, int deckid = 0);
|
||||
#ifdef AI_CHANGE_TESTING
|
||||
AIPlayer * createAIPlayerTest(MTGAllCards * collection, Player * opponent, string folder);
|
||||
AIPlayer * createAIPlayerTest(GameObserver *observer, MTGAllCards * collection, Player * opponent, string folder);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user