- modified gameOver to be protected and defined two new operations to do the same thing (didWin and setLoser)
- removed ACTION_LOGGING_TESTING code - Fixed AIvsAI games multithreaded games - Activated undo when testsuite is enable - Defined an initial player comparison operator - Fixed multi-threaded modification to subtypes - Fixed gameTurn cleanup for gameObserver reuse
This commit is contained in:
@@ -206,12 +206,12 @@ void DeckStats::save(const std::string& filename)
|
||||
void DeckStats::saveStats(Player *player, Player *opponent, GameObserver * game)
|
||||
{
|
||||
int victory = 1;
|
||||
if (!game->gameOver)
|
||||
if (!game->didWin())
|
||||
{
|
||||
if (player->life == opponent->life) return;
|
||||
if (player->life < opponent->life) victory = 0;
|
||||
}
|
||||
else if (game->gameOver == player)
|
||||
else if (!game->didWin(player))
|
||||
{
|
||||
victory = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user