fixed last check in. Test suite passes. Added comments on possible null pointer exceptions.

Updated XCode project file to include AIPlayerBaka classes.
Added test suite to iOS build
This commit is contained in:
techdragon.nguyen@gmail.com
2011-10-09 05:51:45 +00:00
parent 2bfe76e124
commit 6f10ef8425
16 changed files with 75 additions and 60 deletions
+2 -1
View File
@@ -759,7 +759,7 @@ void MTGLibrary::shuffleTopToBottom(int nbcards)
{
_cards[i] = cards[i - nb_cards];
}
// Logic error here: the final value of cards[i] will always be garbage. possible optimization: use vectors to push and pop
//TODO Logic error here: the final value of cards[i] will always be garbage. possible optimization: use vectors to push and pop
for (int i = 0; i < nb_cards; i++)
{
cards[i] = _cards[i];
@@ -845,6 +845,7 @@ MTGGameZone * MTGGameZone::intToZone(GameObserver *g, int zoneId, MTGCardInstanc
p = source->controller();
if (!target)
{
//TODO source may be NULL, need to handle the case when it is NULL. method declaration has NULL being default value of source and target.
if(source->target)
{
//bug case, this is a patchwork fix for now