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