14143
|
1 |
#include "team.h"
|
|
2 |
|
|
3 |
Hedgehog::Hedgehog()
|
14291
|
4 |
: name(QObject::tr("unnamed", "default hedgehog name").toUtf8()),
|
|
5 |
hat("NoHat"),
|
|
6 |
hp(100),
|
|
7 |
level(0) {}
|
14143
|
8 |
|
|
9 |
Team::Team()
|
14291
|
10 |
: name(QObject::tr("unnamed", "default team name").toUtf8()),
|
|
11 |
color("12345678"),
|
|
12 |
m_hedgehogsNumber(4) {
|
|
13 |
m_hedgehogs.resize(8);
|
14143
|
14 |
}
|
|
15 |
|
14291
|
16 |
void Team::resize(int number) { m_hedgehogsNumber = number; }
|
14143
|
17 |
|
14291
|
18 |
QVector<Hedgehog> Team::hedgehogs() const {
|
|
19 |
return m_hedgehogs.mid(0, m_hedgehogsNumber);
|
14143
|
20 |
}
|