equal
deleted
inserted
replaced
36 // structure for customization and statistics of a single hedgehog |
36 // structure for customization and statistics of a single hedgehog |
37 struct HWHog |
37 struct HWHog |
38 { |
38 { |
39 QString Name; |
39 QString Name; |
40 QString Hat; |
40 QString Hat; |
41 int Rounds, Kills, Deaths, Suicides; |
|
42 |
41 |
43 HWHog() : Rounds(0), Kills(0), Deaths(0), Suicides(0){} |
42 HWHog(){} |
44 }; |
43 }; |
45 |
44 |
46 // class representing a team |
45 // class representing a team |
47 class HWTeam : public QObject |
46 class HWTeam : public QObject |
48 { |
47 { |
63 bool saveToFile(); |
62 bool saveToFile(); |
64 bool fileExists(); |
63 bool fileExists(); |
65 bool wouldOverwriteOtherFile(); |
64 bool wouldOverwriteOtherFile(); |
66 |
65 |
67 // attribute getters |
66 // attribute getters |
68 unsigned int campaignProgress() const; |
|
69 int color() const; |
67 int color() const; |
70 QColor qcolor() const; |
68 QColor qcolor() const; |
71 unsigned int difficulty() const; |
69 unsigned int difficulty() const; |
72 QString flag() const; |
70 QString flag() const; |
73 QString fort() const; |
71 QString fort() const; |
89 void setHedgehog(unsigned int idx, HWHog hh); |
87 void setHedgehog(unsigned int idx, HWHog hh); |
90 void setName(const QString & name); |
88 void setName(const QString & name); |
91 void setNumHedgehogs(unsigned char num); |
89 void setNumHedgehogs(unsigned char num); |
92 void setVoicepack(const QString & voicepack); |
90 void setVoicepack(const QString & voicepack); |
93 void setNetTeam(bool isNetTeam); |
91 void setNetTeam(bool isNetTeam); |
94 |
|
95 // increments for statistical info |
|
96 void incRounds(); |
|
97 void incWins(); |
|
98 |
92 |
99 // convert team info into strings for further computation |
93 // convert team info into strings for further computation |
100 QStringList teamGameConfig(quint32 InitHealth) const; |
94 QStringList teamGameConfig(quint32 InitHealth) const; |
101 |
95 |
102 // comparison operators |
96 // comparison operators |
126 int m_color; |
120 int m_color; |
127 bool m_isNetTeam; |
121 bool m_isNetTeam; |
128 QString m_owner; |
122 QString m_owner; |
129 |
123 |
130 // class members that contain statistics, etc. |
124 // class members that contain statistics, etc. |
131 unsigned int m_campaignProgress; |
|
132 unsigned int m_rounds; |
|
133 unsigned int m_wins; |
|
134 unsigned int AchievementProgress[MAX_ACHIEVEMENTS]; |
125 unsigned int AchievementProgress[MAX_ACHIEVEMENTS]; |
135 }; |
126 }; |
136 |
127 |
137 #endif |
128 #endif |