resolution to issue 794. Non-classic games crashed at the completion of the game.

This commit is contained in:
techdragon.nguyen@gmail.com
2012-02-06 09:07:37 +00:00
parent bc8ec9a065
commit 85848cfe41
4 changed files with 14 additions and 6 deletions
+6
View File
@@ -314,6 +314,12 @@ bool Player::parseLine(const string& s)
return false;
}
void HumanPlayer::End()
{
if(!premade && opponent() && (observer->gameType() == GAME_TYPE_CLASSIC))
DeckStats::GetInstance()->saveStats(this, opponent(), observer);
}
ostream& operator<<(ostream& out, const Player& p)
{
out << "mode=" << p.playMode << endl;
+1 -1
View File
@@ -767,7 +767,7 @@ void TestSuite::ThreadProc(void* inParam)
while(!theGame.observer->gameOver)
theGame.observer->Update(counter++);
if(theGame.observer->mGameType != GAME_TYPE_MOMIR)
if(theGame.observer->gameType() != GAME_TYPE_MOMIR)
{
stringstream stream;
stream << *(theGame.observer);