Replaced unnecessary custom shuffle methods with std::random_shuffle<>.

This commit is contained in:
wrenczes@gmail.com
2011-02-05 06:25:25 +00:00
parent f6bef26243
commit a0a3c59b29
2 changed files with 2 additions and 32 deletions
+1 -8
View File
@@ -574,14 +574,7 @@ void MTGGameZone::cleanupPhase()
void MTGGameZone::shuffle()
{
int i;
for (i = 0; i < (nb_cards); i++)
{
int r = i + (WRand() % (nb_cards - i)); // Random remaining position.
MTGCardInstance * temp = cards[i];
cards[i] = cards[r];
cards[r] = temp;
}
std::random_shuffle(cards.begin(), cards.end());
}
void MTGGameZone::addCard(MTGCardInstance * card)