-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRegionModel.hpp
103 lines (87 loc) · 2.49 KB
/
RegionModel.hpp
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#ifndef REGIONMODEL_HPP
#define REGIONMODEL_HPP
#include <QObject>
#include <QMap>
#include "WonderModel.hpp"
class RegionModel : public QObject
{
Q_OBJECT
// Save
int region;
int tribes;
int movedTribes;
int selectedTribes;
bool mountain;
bool volcano;
bool forest;
bool farm;
bool desert;
bool faultLine;
bool selected;
bool city;
bool capitol;
int cityAV;
int selectedCityAV;
bool advanceAquired;
QMap<WonderModel::Wonder, int> wonders;
public:
RegionModel(int region = -1, QObject *parent = 0);
public:
int getTribeSupportCount() const;
void toggleMountain();
void toggleForest();
void addToMovedTribes(int movedTribes);
void removeFromMovedTribes(int movedTribes);
void mergeMovedTribes();
void decimateTribes(int tribes);
void decimateSelectedTribes();
void increaseCityAV(int cityAV);
void decreaseCityAV(int cityAV);
void decimateZeroAVCity();
void reduceSelectedCityAV();
void buildWonder(WonderModel::Wonder wonder);
void decimateWonder(WonderModel::Wonder wonder);
void decimateAllWonders();
// Get-Methods
int getRegion() const;
int getTribes() const;
bool hasTribes() const;
int getMovedTribes() const;
int getSelectedTribes() const;
bool hasMountain() const;
bool hasVolcano() const;
bool hasForest() const;
bool hasFarm() const;
bool hasDesert() const;
bool hasFaultLine() const;
bool isSelected() const;
bool hasCity() const;
bool isCapitolRegion() const;
int getCityAV() const;
int getSelectedCityAV() const;
bool hasAdvanceAquired() const;
bool hasWonders() const;
bool hasWonder(WonderModel::Wonder wonder) const;
QMap<WonderModel::Wonder, int> getBuiltWonders() const;
// Set-Methods
void setTribes(int tribes);
void setCity(bool city);
void setCapitolRegion(bool capitol);
void toggleCapitol();
void setCityAV(int cityAV);
void setSelectedTribes(int selectedTribes);
void setSelectedCityAV(int selectedCityAV);
void setMountain(bool mountain);
void setVolcano(bool volcano);
void setForest(bool forest);
void setFarm(bool farm);
void setDesert(bool desert);
void setFaultLine(bool faultLine);
void setSelected(bool selected);
void setAdvanceAquired(bool advanceAquired);
public:
// Serialization
void serialize(QDataStream &writer) const;
void deserialize(QDataStream &reader);
};
#endif // REGIONMODEL_HPP