exile zone

enabled exile zones for both players
This commit is contained in:
Anthony Calosa
2015-10-26 19:14:50 +08:00
parent 8eeaa40cec
commit cdf94b281f
10 changed files with 125 additions and 81 deletions
+12 -9
View File
@@ -46,8 +46,8 @@ MTGCardInstance * TestSuiteAI::getCard(string action)
for (int i = 0; i < 2; i++)
{
Player * p = observer->players[i];
MTGGameZone * zones[] = { p->game->library, p->game->hand, p->game->inPlay, p->game->graveyard };
for (int j = 0; j < 4; j++)
MTGGameZone * zones[] = { p->game->library, p->game->hand, p->game->inPlay, p->game->graveyard, p->game->exile };
for (int j = 0; j < 5; j++)
{
MTGGameZone * zone = zones[j];
for (int k = 0; k < zone->nb_cards; k++)
@@ -394,12 +394,13 @@ void TestSuiteGame::assertGame()
error++;
}
MTGGameZone * playerZones[] = { p->game->graveyard, p->game->library, p->game->hand, p->game->inPlay };
MTGGameZone * playerZones[] = { p->game->graveyard, p->game->library, p->game->hand, p->game->inPlay, p->game->exile };
MTGGameZone * endstateZones[] = { endState.players[i]->game->graveyard,
endState.players[i]->game->library,
endState.players[i]->game->hand,
endState.players[i]->game->inPlay };
for (int j = 0; j < 4; j++)
endState.players[i]->game->inPlay,
endState.players[i]->game->exile };
for (int j = 0; j < 5; j++)
{
MTGGameZone * zone = playerZones[j];
if (zone->nb_cards != endstateZones[j]->nb_cards)
@@ -853,12 +854,13 @@ void TestSuiteGame::initGame()
stringstream stream;
stream << initState.players[i]->getRandomGenerator()->saveLoadedRandValues(stream);
p->getRandomGenerator()->loadRandValues(stream.str());
MTGGameZone * playerZones[] = { p->game->graveyard, p->game->library, p->game->hand, p->game->inPlay };
MTGGameZone * playerZones[] = { p->game->graveyard, p->game->library, p->game->hand, p->game->inPlay, p->game->exile };
MTGGameZone * loadedPlayerZones[] = { initState.players[i]->game->graveyard,
initState.players[i]->game->library,
initState.players[i]->game->hand,
initState.players[i]->game->inPlay };
for (int j = 0; j < 4; j++)
initState.players[i]->game->inPlay,
initState.players[i]->game->exile };
for (int j = 0; j < 5; j++)
{
MTGGameZone * zone = playerZones[j];
for (size_t k = 0; k < loadedPlayerZones[j]->cards.size(); k++)
@@ -910,9 +912,10 @@ MTGPlayerCards * TestSuiteGame::buildDeck(Player* player, int playerId)
MTGGameZone * loadedPlayerZones[] = { initState.players[playerId]->game->graveyard,
initState.players[playerId]->game->library,
initState.players[playerId]->game->hand,
initState.players[playerId]->game->exile,
initState.players[playerId]->game->inPlay };
for (int j = 0; j < 4; j++)
for (int j = 0; j < 5; j++)
{
for (size_t k = 0; k < loadedPlayerZones[j]->cards.size(); k++)
{