update
This commit is contained in:
@@ -11,9 +11,19 @@ struct Player {
|
||||
QColor primaryColor;
|
||||
QColor secondaryColor;
|
||||
|
||||
Player() : id(0), name("Unknown"), primaryColor(Qt::blue), secondaryColor(Qt::white) {}
|
||||
Player(int pId, const QString &pName, const QColor &primary, const QColor &secondary)
|
||||
: id(pId), name(pName), primaryColor(primary), secondaryColor(secondary) {}
|
||||
// National resources (shared across all cities of this nation)
|
||||
int culture;
|
||||
int science;
|
||||
int gold;
|
||||
int faith;
|
||||
|
||||
Player()
|
||||
: id(0), name("Unknown"), primaryColor(Qt::blue), secondaryColor(Qt::white),
|
||||
culture(10000), science(0), gold(0), faith(0) {}
|
||||
Player(int pId, const QString &pName, const QColor &primary, const QColor &secondary,
|
||||
int pCulture = 10000, int pScience = 0, int pGold = 0, int pFaith = 0)
|
||||
: id(pId), name(pName), primaryColor(primary), secondaryColor(secondary),
|
||||
culture(pCulture), science(pScience), gold(pGold), faith(pFaith) {}
|
||||
};
|
||||
|
||||
class PlayerManager {
|
||||
@@ -24,6 +34,7 @@ public:
|
||||
const Player* getPlayer(int id) const;
|
||||
Player* getPlayer(int id);
|
||||
const std::vector<Player>& getPlayers() const { return m_players; }
|
||||
std::vector<Player>& getPlayersMutable() { return m_players; }
|
||||
|
||||
bool isCombinationUnique(const QColor &primary, const QColor &secondary, int excludeId = -1) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user