equal
deleted
inserted
replaced
27 #include "hwconsts.h" |
27 #include "hwconsts.h" |
28 |
28 |
29 #include <QStringList> |
29 #include <QStringList> |
30 #include <QDebug> |
30 #include <QDebug> |
31 |
31 |
32 HWTeam::HWTeam(const QString & teamname) : |
32 HWTeam::HWTeam(const QString & teamname, bool isNet) : |
33 difficulty(0), |
33 difficulty(0), |
34 netTeam(false) |
34 netTeam(isNet) |
35 { |
35 { |
36 TeamName = teamname; |
36 TeamName = teamname; |
37 OldTeamName = TeamName; |
37 OldTeamName = TeamName; |
38 for (int i = 0; i < 8; i++) HHName[i].sprintf("hedgehog %d", i); |
38 for (int i = 0; i < 8; i++) HHName[i].sprintf("hedgehog %d", i); |
39 Grave = "Simple"; |
39 Grave = "Simple"; |
228 QString::number(InitHealth))); |
228 QString::number(InitHealth))); |
229 return sl; |
229 return sl; |
230 } |
230 } |
231 |
231 |
232 bool HWTeam::operator==(const HWTeam& t1) const { |
232 bool HWTeam::operator==(const HWTeam& t1) const { |
233 return TeamName==t1.TeamName; |
233 return TeamName==t1.TeamName && netTeam==t1.netTeam; |
234 } |
234 } |
235 |
235 |
236 bool HWTeam::operator<(const HWTeam& t1) const { |
236 bool HWTeam::operator<(const HWTeam& t1) const { |
237 return TeamName<t1.TeamName; |
237 return TeamName<t1.TeamName || (netTeam < t1.netTeam); // if names are equal - test if it is net team |
238 } |
238 } |