- bool HeroPositionOccupied(int index) { return index >= 0 && index < int(heroes.size()); }
- std::vector<Hero> &Heroes() { return heroes; }
- const std::vector<Hero> &Heroes() const { return heroes; }
+ bool HeroPositionOccupied(int index) const { return index >= 0 && index < numHeroes; }
+
+ void SetRunaway() { ranAway = true; }
+
+ struct Order {
+ Order(int index, bool isMonster)
+ : index(index), isMonster(isMonster) { }
+ int index;
+ bool isMonster;
+ };
+
+ void CalculateAttackOrder();
+ void NextAttack();
+ bool AttacksFinished() const { return attackCursor >= int(attackOrder.size()); }
+ void CalculateDamage();
+ void ApplyDamage();
+ const Order &CurrentAttack() const { return attackOrder[attackCursor]; };
+ void ClearAllAttacks();