-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCardValues.h
72 lines (59 loc) · 1.7 KB
/
CardValues.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#ifndef CardValuesH
#define CardValuesH
#include "CardData.h"
#include <string>
#include <map>
#include <set>
class TCardValues
{
std::map<string, string> Values;
public:
TCardValues();
TCardValues(string FileName);
bool GetValue(string Name, string& Value) const;
void SetValue(string Name, string Value);
};
class TDraftArchetype
{
TCardValues CardValues;
const TCardValues& DefaultValues;
string Name;
std::set<TCardColor> Colors;
static const double ExpectedPickQuality[BoosterSize];
public:
TDraftArchetype(
string aName,
std::set<TCardColor> aColors,
const TCardValues& aDefaultValues);
TCardValues& GetCardValues() { return CardValues; };
const string GetName() const { return Name; };
const std::set<TCardColor> GetColors() const { return Colors; };
double GetValue(const string Name, const TCardPile& Picked) const;
bool ColorFits(TCardColor c) const;
bool Belongs(const TCardData* Card) const;
double PickValue(const TCardPile& Picked, const TCardData* Card, double& CardValue) const;
};
double EvalCardValue(string Formula, const TCardPile& Picked);
class TArchetyper
{
public:
TArchetyper();
// âîçâðàùàåò îáùèé âåñ äåêè.
string TArchetyper::PickValue(
const TCardPile& Picked,
const TCardData* Card,
double& CardValue,
double& DeckValue) const;
void SaveDeck(
TCardPile& Picked,
string Filename,
bool MaglibFmt,
bool DeepAnalysis);
const std::vector<TDraftArchetype*>& GetArchetypes() const { return Archetypes; };
private:
std::vector<TDraftArchetype*> Archetypes;
TCardValues DefaultValues;
void ReadArchetypes();
void FreeArchetypes();
};
#endif