author | nemo |
Wed, 09 Jan 2019 16:27:57 -0500 | |
changeset 14536 | e0af4ce7d8bc |
parent 14296 | f1a5b7baa87f |
permissions | -rw-r--r-- |
14148 | 1 |
#include "team.h" |
2 |
||
3 |
Hedgehog::Hedgehog() |
|
14296 | 4 |
: name(QObject::tr("unnamed", "default hedgehog name").toUtf8()), |
5 |
hat("NoHat"), |
|
6 |
hp(100), |
|
7 |
level(0) {} |
|
14148 | 8 |
|
9 |
Team::Team() |
|
14296 | 10 |
: name(QObject::tr("unnamed", "default team name").toUtf8()), |
11 |
color("12345678"), |
|
12 |
m_hedgehogsNumber(4) { |
|
13 |
m_hedgehogs.resize(8); |
|
14148 | 14 |
} |
15 |
||
14296 | 16 |
void Team::resize(int number) { m_hedgehogsNumber = number; } |
14148 | 17 |
|
14296 | 18 |
QVector<Hedgehog> Team::hedgehogs() const { |
19 |
return m_hedgehogs.mid(0, m_hedgehogsNumber); |
|
14148 | 20 |
} |