promoted StatsWrapper struct into class

altered deck editor information display for statistics
This commit is contained in:
techdragon.nguyen@gmail.com
2010-11-07 18:28:54 +00:00
parent 2d31cbdaf5
commit 61cc3692a5
8 changed files with 338 additions and 268 deletions

View File

@@ -4,6 +4,8 @@
#include <map>
#include <string>
#include <vector>
#include "MTGDefinitions.h"
using namespace std;
class Player;
@@ -36,4 +38,52 @@ public:
int nbGames();
};
class StatsWrapper {
public:
StatsWrapper( int deckId );
~StatsWrapper();
// Stats parameters and status
int currentPage;
int pageCount;
bool needUpdate;
// Actual stats
int percentVictories;
int gamesPlayed;
int cardCount;
int countLands;
int totalPrice;
int totalManaCost;
float avgManaCost;
int totalCreatureCost;
float avgCreatureCost;
int totalSpellCost;
float avgSpellCost;
int countManaProducers;
int countCreatures, countSpells, countInstants, countEnchantments, countSorceries, countArtifacts;
float noLandsProbInTurn[Constants::STATS_FOR_TURNS];
float noCreaturesProbInTurn[Constants::STATS_FOR_TURNS];
int countCardsPerCost[Constants::STATS_MAX_MANA_COST+1];
int countCardsPerCostAndColor[Constants::STATS_MAX_MANA_COST+1][Constants::MTG_NB_COLORS+1];
int countCreaturesPerCost[Constants::STATS_MAX_MANA_COST+1];
int countCreaturesPerCostAndColor[Constants::STATS_MAX_MANA_COST+1][Constants::MTG_NB_COLORS+1];
int countSpellsPerCost[Constants::STATS_MAX_MANA_COST+1];
int countSpellsPerCostAndColor[Constants::STATS_MAX_MANA_COST+1][Constants::MTG_NB_COLORS+1];
int countLandsPerColor[Constants::MTG_NB_COLORS+1];
int countBasicLandsPerColor[Constants::MTG_NB_COLORS+1];
int countNonLandProducersPerColor[Constants::MTG_NB_COLORS+1];
int totalCostPerColor[Constants::MTG_NB_COLORS+1];
int totalColoredSymbols;
vector<string> aiDeckNames;
vector<DeckStat*> aiDeckStats;
};
#endif