removed dead code "shuffleTopToBottom()" method.

This commit is contained in:
techdragon.nguyen@gmail.com
2011-10-15 21:10:05 +00:00
parent 189351d82c
commit 8554076f3c
2 changed files with 0 additions and 27 deletions

View File

@@ -121,7 +121,6 @@ class MTGGameZone {
class MTGLibrary: public MTGGameZone {
public:
void shuffleTopToBottom(int nbcards);
virtual ostream& toString(ostream&) const;
const char * getName(){return "library";}
};

View File

@@ -749,32 +749,6 @@ void MTGInPlay::untapAll()
}
// pointer object to random number generator. MRand( ptrdiff_t) defined in utils.cpp
ptrdiff_t (*p_wagicRandomizer)(ptrdiff_t) = MRand;
//--------------------------
void MTGLibrary::shuffleTopToBottom(int nbcards)
{
if (!nbcards) return;
if (nbcards > nb_cards)
nbcards = nb_cards;
vector<MTGCardInstance *>::iterator it = cards.begin();
it += nbcards;
random_shuffle( cards.begin(), it, p_wagicRandomizer);
if (nbcards < nb_cards)
{
// move the top nbcards to the bottom of the deck;
for (int i = 0; i < nbcards; ++i)
{
cards.push_back( cards[i]);
}
cards.erase(cards.begin(), it);
}
}
MTGGameZone * MTGGameZone::intToZone(int zoneId, Player * p, Player * p2)
{