author | Wuzzy <Wuzzy2@mail.ru> |
Tue, 30 Apr 2019 15:29:44 +0200 | |
changeset 14879 | 13589d529899 |
parent 14312 | f1a5b7baa87f |
permissions | -rw-r--r-- |
14164 | 1 |
#include "team.h" |
2 |
||
3 |
Hedgehog::Hedgehog() |
|
14312 | 4 |
: name(QObject::tr("unnamed", "default hedgehog name").toUtf8()), |
5 |
hat("NoHat"), |
|
6 |
hp(100), |
|
7 |
level(0) {} |
|
14164 | 8 |
|
9 |
Team::Team() |
|
14312 | 10 |
: name(QObject::tr("unnamed", "default team name").toUtf8()), |
11 |
color("12345678"), |
|
12 |
m_hedgehogsNumber(4) { |
|
13 |
m_hedgehogs.resize(8); |
|
14164 | 14 |
} |
15 |
||
14312 | 16 |
void Team::resize(int number) { m_hedgehogsNumber = number; } |
14164 | 17 |
|
14312 | 18 |
QVector<Hedgehog> Team::hedgehogs() const { |
19 |
return m_hedgehogs.mid(0, m_hedgehogsNumber); |
|
14164 | 20 |
} |