- Hero &HeroAt(std::vector<Hero>::size_type index) { return heroes[index]; }
- const Hero &HeroAt(std::vector<Hero>::size_type index) const { return heroes[index]; }
- const HeroTag &ActiveHeroTag() const { return heroTags[activeHero]; }
- const HeroTag &HeroTagAt(std::vector<Hero>::size_type index) const { return heroTags[index]; }
- const geometry::Point<int> &HeroTagPositionAt(std::vector<Hero>::size_type index) const { return heroTagPositions[index]; }
- bool HasChosenAttackType() const { return attackChoices[activeHero].GetType() != AttackChoice::UNDECIDED; }
- void SetAttackType(AttackChoice::Type t) { attackChoices[activeHero].SetType(t); }
- AttackChoice &ActiveHeroAttackChoice() { return attackChoices[activeHero]; }
- const AttackChoice &ActiveHeroAttackChoice() const { return attackChoices[activeHero]; }
- TargetSelection &ActiveHeroTargets() { return attackChoices[activeHero].Selection(); }
- const TargetSelection &ActiveHeroTargets() const { return attackChoices[activeHero].Selection(); }
- bool AttackSelectionDone() const { return activeHero >= (int) heroes.size(); }
-
- graphics::Menu</* Spell */ void *> &GetSpellMenu() { return spellMenus[activeHero]; }
- const graphics::Menu</* Spell */ void *> &GetSpellMenu() const { return spellMenus[activeHero]; }
- graphics::Menu</* Ikari or Item */ void *> &GetIkariMenu() { return ikariMenus[activeHero]; }
- const graphics::Menu</* Ikari or Item */ void *> &GetIkariMenu() const { return ikariMenus[activeHero]; }
- graphics::Menu<const common::Item *> &GetItemMenu() { return itemMenu; }
- const graphics::Menu<const common::Item *> &GetItemMenu() const { return itemMenu; }
+
+ 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]; }
+ bool AttackSelectionDone() const { return activeHero >= numHeroes; }
+
+ int NumHeroes() const { return numHeroes; }
+ int MaxHeroes() const { return 4; }
+ int MaxMonsters() const { return monsters.size(); }