Files
wagic/projects/mtg/include/DeckMetaData.h

72 lines
1.5 KiB
C++

#ifndef _DECKMETADATA_H_
#define _DECKMETADATA_H_
#include <string>
#include <vector>
#include <map>
#include "DeckStats.h"
using namespace std;
enum DECK_DIFFICULTY
{
HARD = -1,
NORMAL = 0,
EASY = 1
};
class DeckMetaData
{
private:
string mFilename;
string mDescription;
string mName;
vector<int> mUnlockRequirements;
int mDeckId;
string mAvatarFilename;
string mColorIndex;
bool mCommanderDeck; //Added to read the command tag in deck's metafile.
// statistical information
int mGamesPlayed, mVictories, mPercentVictories, mDifficulty;
int getAvatarId();
DeckMetaData();
public:
DeckMetaData(const string& filename, bool isAI = false);
void LoadDeck();
void LoadStats();
// Accessors
bool isCommanderDeck(); //Added to read the command tag in deck's metafile.
string getFilename();
string getDescription();
string getName();
string getAvatarFilename();
string getColorIndex();
string getStatsSummary();
vector<int> getUnlockRequirements();
int getDeckId();
int getGamesPlayed();
int getVictories();
int getVictoryPercentage();
int getDifficulty();
string getDifficultyString();
// setters
void setColorIndex(const string& colorIndex);
void setDeckName( const string& newDeckTitle );
void Invalidate();
string mStatsFilename;
string mPlayerDeck;
bool mDeckLoaded;
bool mStatsLoaded;
bool mIsAI;
};
#endif