Files
wagic/projects/mtg/include/DeckMetaData.h
techdragon.nguyen@gmail.com 2fdc80aee1 Synchronized avatar images to be loaded correctly on first display of the opponent selection.
* changed how the avatar images are assigned since how they were before was incorrect.  They are now assigned upon instantiation of the meta file.  Not when the stats are calculated.  
* Added new image for "Evil Twin".  This is a horizontally flipped image of the original player avatar with a red background.  Please feel free to edit the image.
* removed display of avatar image on menu items in deck selection that are not deck related. (ie "Cancel", "Back to Main Menu", etc)  "New Deck" also does not have an image since no deck really exists yet so no avatar.  

Issue: 622
2011-04-20 17:51:40 +00:00

69 lines
1.2 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;
int mDeckId;
string mAvatarFilename;
string mColorIndex;
// statistical information
int mGamesPlayed, mVictories, mPercentVictories, mDifficulty;
int getAvatarId();
DeckMetaData();
public:
DeckMetaData(const string& filename, bool isAI = false);
void LoadDeck();
void LoadStats();
// Accessors
string getFilename();
string getDescription();
string getName();
string getAvatarFilename();
string getColorIndex();
string getStatsSummary();
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