- void SetAttackType(AttackChoice::Type t) { attackChoices[activeHero].SetType(t); }
- bool AttackSelectionDone() const { return activeHero >= (int) heroes.size(); }
+ AttackChoice &ActiveHeroAttackChoice() { return attackChoices[activeHero]; }
+ const AttackChoice &ActiveHeroAttackChoice() const { return attackChoices[activeHero]; }
+ const AttackChoice &AttackChoiceAt(int index) const { return attackChoices[index]; }
+ bool AttackSelectionDone() const { return activeHero >= numHeroes; }
+
+ int NumHeroes() const { return numHeroes; }
+ int MaxHeroes() const { return 4; }
+ int MaxMonsters() const { return monsters.size(); }
+
+ const std::vector<geometry::Point<int> > &MonsterPositions() const { return monsterPositions; }
+ bool MonsterPositionOccupied(int index) { return index >= 0 && index < int(monsters.size()) && monsters[index].Health() > 0; }
+ const std::vector<geometry::Point<int> > &HeroesPositions() const { return heroesPositions; }
+ bool HeroPositionOccupied(int index) const { return index >= 0 && index < numHeroes; }
+
+ void SetRunaway() { ranAway = true; }
+ void ClearAllAttacks();
+
+ struct Order {
+ Order(int index, bool isMonster)
+ : index(index), isMonster(isMonster) { }
+ int index;
+ bool isMonster;
+ };
+
+ void WriteOrder(std::vector<Order> &);