Implemented and fixed all code required to run at least a single turn.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -16,11 +16,18 @@ namespace CreatureLib::Battling {
|
||||
|
||||
public:
|
||||
explicit BattleSide(Battle* battle, uint8_t creaturesPerSide)
|
||||
: _creaturesPerSide(creaturesPerSide), _creatures(creaturesPerSide), _choices(creaturesPerSide),
|
||||
_battle(battle) {
|
||||
: _creaturesPerSide(creaturesPerSide), _battle(battle) {
|
||||
_creatures = std::vector<Creature*>(creaturesPerSide);
|
||||
_choices = std::vector<BaseTurnChoice*>(creaturesPerSide);
|
||||
for (size_t i = 0; i < creaturesPerSide; i++) {
|
||||
_creatures[i] = nullptr;
|
||||
_choices[i] = nullptr;
|
||||
}
|
||||
ResetChoices();
|
||||
}
|
||||
|
||||
virtual ~BattleSide() = default;
|
||||
|
||||
[[nodiscard]] bool AllChoicesSet() const;
|
||||
[[nodiscard]] const std::vector<BaseTurnChoice*>& GetChoices() const;
|
||||
|
||||
@@ -32,7 +39,7 @@ namespace CreatureLib::Battling {
|
||||
Creature* GetCreature(uint8_t index) const;
|
||||
bool CreatureOnSide(const Creature* creature) const;
|
||||
|
||||
void GetActiveScripts(std::vector<ScriptWrapper>& scripts) override;
|
||||
void GetActiveScripts(std::vector<ScriptWrapper>& scripts) final;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user