- Added poison counter check into the testsuite
- Decorelated the testsuite AI timer from the game timer to be able to have reproduceable results with AI tests. - Created a random generator wrapper class - Used two seperate instances of this random generator for AI and for the game - Added methods to load randoms into AI from a testcase - Fixed a probleme with undo and premade decks introduced in r4035 - Added basic test to test AI proliferate code - Cleaned up goblin_artillery test - Added AI tests into the testsuite test list - Fixed looping bug into the multi target AI code
This commit is contained in:
@@ -254,8 +254,8 @@ Player * Rules::loadPlayerMomir(GameObserver* observer, int isAI)
|
||||
|
||||
Player * Rules::loadPlayerRandom(GameObserver* observer, int isAI, int mode)
|
||||
{
|
||||
int color1 = 1 + WRand(true) % 5;
|
||||
int color2 = 1 + WRand(true) % 5;
|
||||
int color1 = 1 + observer->getRandomGenerator()->random() % 5;
|
||||
int color2 = 1 + observer->getRandomGenerator()->random() % 5;
|
||||
int color0 = Constants::MTG_COLOR_ARTIFACT;
|
||||
if (mode == GAME_TYPE_RANDOM1) color2 = color1;
|
||||
int colors[] = { color1, color2, color0 };
|
||||
@@ -367,7 +367,7 @@ void Rules::initGame(GameObserver *g)
|
||||
if (g->currentPlayer->playMode!= Player::MODE_TEST_SUITE && g->mRules->gamemode!= GAME_TYPE_STORY)
|
||||
{
|
||||
if(OptionWhosFirst::WHO_R == options[Options::FIRSTPLAYER].number)
|
||||
initState.player = WRand(true) % 2;
|
||||
initState.player = g->getRandomGenerator()->random() % 2;
|
||||
if(OptionWhosFirst::WHO_O == options[Options::FIRSTPLAYER].number)
|
||||
initState.player = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user