All code submission.
- Posts: 5
- Joined: Wed Jan 11, 2012 4:13 am
In the function "IsDone" the condition was set to observer->players[1
]->life >= targetLife, thus the life of the opponent was considered instead of the own life.
For the corrected code see below.
Code: Select all
bool TaskImmortal::isDone(GameObserver *observer, GameApp * _app)
return (!observer->players->isAI()) && (observer->players->isAI()) && (observer->gameOver != observer->players) // Human player wins
&& (observer->players->life >= targetLife);
- Site Admin
- Posts: 3727
- Joined: Wed Oct 15, 2008 12:42 am
- Location: Japan
Thanks a lot! I'll add this fix to the svn asap