Merge pull request #915 from WagicProject/test_suite_function_fix
- fixed small compiling error for a function in testsuite
This commit is contained in:
@@ -77,7 +77,7 @@ public:
|
||||
RandomGenerator(unsigned int seed = -1, bool doLog = false) : log(doLog) { if(seed != (unsigned int)-1) srand(seed);};
|
||||
void loadRandValues(string s);
|
||||
ostream& saveUsedRandValues(ostream& out) const;
|
||||
ostream& saveLoadedRandValues(ostream& out);
|
||||
ostream& saveLoadedRandValues(ostream& out) const;
|
||||
int random();
|
||||
void setSeed(unsigned int seed) { srand(seed); };
|
||||
template<typename Iter> void random_shuffle(Iter first, Iter last)
|
||||
|
||||
@@ -852,7 +852,7 @@ void TestSuiteGame::initGame()
|
||||
p->life = initState.players[i]->life;
|
||||
p->poisonCount = initState.players[i]->poisonCount;
|
||||
stringstream stream;
|
||||
stream << initState.players[i]->getRandomGenerator()->saveLoadedRandValues(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, p->game->removedFromGame };
|
||||
MTGGameZone * loadedPlayerZones[] = { initState.players[i]->game->graveyard,
|
||||
|
||||
@@ -49,9 +49,9 @@ ostream& RandomGenerator::saveUsedRandValues(ostream& out) const
|
||||
return out;
|
||||
}
|
||||
|
||||
ostream& RandomGenerator::saveLoadedRandValues(ostream& out)
|
||||
ostream& RandomGenerator::saveLoadedRandValues(ostream& out) const
|
||||
{
|
||||
list<int>::iterator ite;
|
||||
list<int>::const_iterator ite;
|
||||
for(ite=loadedRandomValues.begin(); ite != loadedRandomValues.end(); ite++)
|
||||
{
|
||||
out << *ite << ",";
|
||||
|
||||
Reference in New Issue
Block a user