Fix players vector (had a couple of 4 players game with the new code), added more cleanup

This commit is contained in:
Xawotihs
2011-10-01 23:49:37 +00:00
parent 76a8f406ec
commit 483c767492
8 changed files with 39 additions and 50 deletions

View File

@@ -30,6 +30,7 @@ Player::Player(GameObserver *observer, string file, string fileSmall, MTGDeck *
if (deck != NULL)
{
game = NEW MTGPlayerCards(deck);
// This automatically sets the observer pointer on all the deck cards
game->setOwner(this);
deckName = deck->meta_name;
}
@@ -106,7 +107,6 @@ HumanPlayer::HumanPlayer(GameObserver *observer, string file, string fileSmall,
{
loadAvatar("avatar.jpg");
playMode = MODE_HUMAN;
setObserver(observer);
}
ManaPool * Player::getManaPool()