No code change just reformatting of header files.
finishing up my reformatting of the source from November/December following the guidelines that were posted. some extra things I added: * Any empty virtual declarations were kept to one line. * Enums were split up into separate lines to promote uniformity across all headers. ( each header file had a different style for enums)
This commit is contained in:
@@ -3,86 +3,138 @@
|
||||
|
||||
class ShopBooster;
|
||||
|
||||
class MTGPackEntry{
|
||||
class MTGPackEntry
|
||||
{
|
||||
public:
|
||||
virtual ~MTGPackEntry() {};
|
||||
virtual int addCard(WSrcCards * pool,MTGDeck * to) = 0;
|
||||
int copies;
|
||||
virtual ~MTGPackEntry()
|
||||
{
|
||||
}
|
||||
;
|
||||
virtual int addCard(WSrcCards * pool, MTGDeck * to) = 0;
|
||||
int copies;
|
||||
};
|
||||
|
||||
class MTGPackEntryRandom: public MTGPackEntry{
|
||||
class MTGPackEntryRandom: public MTGPackEntry
|
||||
{
|
||||
public:
|
||||
MTGPackEntryRandom() {filter = ""; copies=1;};
|
||||
MTGPackEntryRandom(string f, int c=1) {filter = f; copies = c;};
|
||||
int addCard(WSrcCards * pool,MTGDeck * to);
|
||||
string filter;
|
||||
MTGPackEntryRandom()
|
||||
{
|
||||
filter = "";
|
||||
copies = 1;
|
||||
}
|
||||
;
|
||||
MTGPackEntryRandom(string f, int c = 1)
|
||||
{
|
||||
filter = f;
|
||||
copies = c;
|
||||
}
|
||||
;
|
||||
int addCard(WSrcCards * pool, MTGDeck * to);
|
||||
string filter;
|
||||
};
|
||||
class MTGPackEntrySpecific: public MTGPackEntry{
|
||||
class MTGPackEntrySpecific: public MTGPackEntry
|
||||
{
|
||||
public:
|
||||
int addCard(WSrcCards * pool,MTGDeck * to);
|
||||
MTGCard * card;
|
||||
int addCard(WSrcCards * pool, MTGDeck * to);
|
||||
MTGCard * card;
|
||||
};
|
||||
|
||||
class MTGPackEntryNothing: public MTGPackEntry{
|
||||
class MTGPackEntryNothing: public MTGPackEntry
|
||||
{
|
||||
public:
|
||||
int addCard(WSrcCards * pool,MTGDeck * to) {return 0;};
|
||||
int addCard(WSrcCards * pool, MTGDeck * to)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
;
|
||||
};
|
||||
|
||||
class MTGPackSlot{
|
||||
class MTGPackSlot
|
||||
{
|
||||
public:
|
||||
~MTGPackSlot();
|
||||
int add(WSrcCards * ocean, MTGDeck * to, int carryover);
|
||||
void addEntry(MTGPackEntry*item);
|
||||
int copies;
|
||||
string pool;
|
||||
vector<MTGPackEntry*> entries;
|
||||
~MTGPackSlot();
|
||||
int add(WSrcCards * ocean, MTGDeck * to, int carryover);
|
||||
void addEntry(MTGPackEntry*item);
|
||||
int copies;
|
||||
string pool;
|
||||
vector<MTGPackEntry*> entries;
|
||||
};
|
||||
|
||||
class MTGPack{
|
||||
class MTGPack
|
||||
{
|
||||
public:
|
||||
friend class MTGPacks;
|
||||
friend class ShopBooster;
|
||||
friend class MTGSetInfo;
|
||||
bool meetsRequirements(); //Check if pool contains locked cards.
|
||||
bool isUnlocked();
|
||||
bool isValid() {return bValid;};
|
||||
void load(string filename);
|
||||
int assemblePack(MTGDeck * to);
|
||||
|
||||
MTGPack() {bValid = false; unlockStatus = 0; price=Constants::PRICE_BOOSTER;};
|
||||
MTGPack(string s) {bValid = false; load(s); unlockStatus = 0;};
|
||||
~MTGPack();
|
||||
string getName();
|
||||
string getSort() {return sort;};
|
||||
int getPrice() {return price;};
|
||||
static WSrcCards * getPool(string poolstr);
|
||||
friend class MTGPacks;
|
||||
friend class ShopBooster;
|
||||
friend class MTGSetInfo;
|
||||
bool meetsRequirements(); //Check if pool contains locked cards.
|
||||
bool isUnlocked();
|
||||
bool isValid()
|
||||
{
|
||||
return bValid;
|
||||
}
|
||||
;
|
||||
void load(string filename);
|
||||
int assemblePack(MTGDeck * to);
|
||||
|
||||
MTGPack()
|
||||
{
|
||||
bValid = false;
|
||||
unlockStatus = 0;
|
||||
price = Constants::PRICE_BOOSTER;
|
||||
}
|
||||
;
|
||||
MTGPack(string s)
|
||||
{
|
||||
bValid = false;
|
||||
load(s);
|
||||
unlockStatus = 0;
|
||||
}
|
||||
;
|
||||
~MTGPack();
|
||||
string getName();
|
||||
string getSort()
|
||||
{
|
||||
return sort;
|
||||
}
|
||||
;
|
||||
int getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
;
|
||||
static WSrcCards * getPool(string poolstr);
|
||||
protected:
|
||||
void countCards();
|
||||
string name; //Name of the pack.
|
||||
string type; //"Booster", "Deck", "Whatever"
|
||||
string pool; //The starting pool.
|
||||
string sort; //The sorting method.
|
||||
string check; //Unlock requirements.
|
||||
string desc; //Big card description.
|
||||
bool bValid;
|
||||
int unlockStatus;
|
||||
void countCards();
|
||||
string name; //Name of the pack.
|
||||
string type; //"Booster", "Deck", "Whatever"
|
||||
string pool; //The starting pool.
|
||||
string sort; //The sorting method.
|
||||
string check; //Unlock requirements.
|
||||
string desc; //Big card description.
|
||||
bool bValid;
|
||||
int unlockStatus;
|
||||
|
||||
int price; //Base price.
|
||||
int minCards, maxCards;
|
||||
vector<MTGPackSlot*> slotss;
|
||||
int price; //Base price.
|
||||
int minCards, maxCards;
|
||||
vector<MTGPackSlot*> slotss;
|
||||
};
|
||||
|
||||
class MTGPacks{
|
||||
class MTGPacks
|
||||
{
|
||||
public:
|
||||
~MTGPacks();
|
||||
MTGPack * randomPack(int key=0);
|
||||
void loadAll();
|
||||
int size() {return (int)packs.size();};
|
||||
void refreshUnlocked();
|
||||
|
||||
static MTGPack * getDefault();
|
||||
~MTGPacks();
|
||||
MTGPack * randomPack(int key = 0);
|
||||
void loadAll();
|
||||
int size()
|
||||
{
|
||||
return (int) packs.size();
|
||||
}
|
||||
;
|
||||
void refreshUnlocked();
|
||||
|
||||
static MTGPack * getDefault();
|
||||
private:
|
||||
static MTGPack defaultBooster;
|
||||
vector<MTGPack*> packs;
|
||||
static MTGPack defaultBooster;
|
||||
vector<MTGPack*> packs;
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user