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

@@ -342,8 +342,8 @@ void Rules::initPlayers(GameObserver *g)
for (int i = 0; i < 2; i++)
{
Player * p = initPlayer(g, i);
if(p)
g->players.push_back(p);
if(p && g->getPlayersNumber() < 2)
g->players.push_back(p);
MTGDeck * deck = buildDeck(i);
if (deck)
{