qmlfrontend/team.cpp
author nemo
Wed, 27 Mar 2019 09:52:08 -0400
changeset 14745 fbd385a1bcf4
parent 14312 f1a5b7baa87f
permissions -rw-r--r--
Backed out changeset f9f71cccb5c3 - Wuzzy is right, the license is incompatible. I'd misread the wording on https://fontlibrary.org/en/font/symbola The terms on the author's site prevent using it with almost all FOSS projects, and even prevent using it in a merge like this. We'll just have to find some other font to improve coverage.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14164
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     1
#include "team.h"
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     2
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     3
Hedgehog::Hedgehog()
14312
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
     4
    : name(QObject::tr("unnamed", "default hedgehog name").toUtf8()),
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
     5
      hat("NoHat"),
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
     6
      hp(100),
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
     7
      level(0) {}
14164
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     8
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
     9
Team::Team()
14312
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    10
    : name(QObject::tr("unnamed", "default team name").toUtf8()),
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    11
      color("12345678"),
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    12
      m_hedgehogsNumber(4) {
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    13
  m_hedgehogs.resize(8);
14164
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    14
}
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    15
14312
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    16
void Team::resize(int number) { m_hedgehogsNumber = number; }
14164
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    17
14312
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    18
QVector<Hedgehog> Team::hedgehogs() const {
f1a5b7baa87f Format team.* code
unc0rr
parents: 14164
diff changeset
    19
  return m_hedgehogs.mid(0, m_hedgehogsNumber);
14164
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents:
diff changeset
    20
}