- Hero &HeroAt(int index) { return heroes[index]; }
- const Hero &HeroAt(int index) const { return heroes[index]; }
- Monster &MonsterAt(int index) { return monsters[index]; }
- const Monster &MonsterAt(int index) const { return monsters[index]; }
-
- graphics::Animation &HeroAnimationAt(int index) { return heroAnimations[index]; }
- const graphics::Animation &HeroAnimationAt(int index) const { return heroAnimations[index]; }
-
- const HeroTag &HeroTagAt(int index) const { return heroTags[index]; }
- const geometry::Point<int> &HeroTagPositionAt(int index) const { return heroTagPositions[index]; }
-
- bool HasChosenAttackType() const { return attackChoices[activeHero].GetType() != AttackChoice::UNDECIDED; }
- AttackChoice &ActiveHeroAttackChoice() { return attackChoices[activeHero]; }
- const AttackChoice &ActiveHeroAttackChoice() const { return attackChoices[activeHero]; }
- const AttackChoice &AttackChoiceAt(int index) const { return attackChoices[index]; }
+ Hero &HeroAt(int index) { assert(index >= 0 && index < NumHeroes()); return heroes[index]; }
+ const Hero &HeroAt(int index) const { assert(index >= 0 && index < NumHeroes()); return heroes[index]; }
+ Monster &MonsterAt(int index) { assert(index >= 0 && index < NumHeroes()); return monsters[index]; }
+ const Monster &MonsterAt(int index) const { assert(index >= 0 && index < NumHeroes()); return monsters[index]; }
+
+ const HeroTag &HeroTagAt(int index) const { assert(index >= 0 && index < NumHeroes()); return heroTags[index]; }
+ const geometry::Point<int> &HeroTagPositionAt(int index) const { assert(index >= 0 && index < NumHeroes()); return heroTagPositions[index]; }
+
+ bool HasChosenAttackType() const { return ActiveHeroAttackChoice().GetType() != AttackChoice::UNDECIDED; }
+ AttackChoice &ActiveHeroAttackChoice() { return AttackChoiceAt(activeHero); }
+ const AttackChoice &ActiveHeroAttackChoice() const { return AttackChoiceAt(activeHero); }
+ AttackChoice &AttackChoiceAt(int index) { assert(index >= 0 && index < NumHeroes()); return heroes[index].GetAttackChoice(); }
+ const AttackChoice &AttackChoiceAt(int index) const { assert(index >= 0 && index < NumHeroes()); return heroes[index].GetAttackChoice(); }
+ AttackChoice &MonsterAttackChoiceAt(int index) { assert(index >= 0 && index < MaxMonsters()); return monsterAttacks[index]; }
+ const AttackChoice &MonsterAttackChoiceAt(int index) const { assert(index >= 0 && index < MaxMonsters()); return monsterAttacks[index]; }