//
// Created by Dan Crosby on 6/4/20.
//

#ifndef EAGLE0_PERFORMUNDEADCOMMANDSACTION_HPP
#define EAGLE0_PERFORMUNDEADCOMMANDSACTION_HPP

#include <utility>

#include "src/main/cpp/net/eagle0/shardok/library/AvailableCommandsFactory.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/ShardokAction.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/settings/GameSettings.hpp"

namespace shardok {

class PerformUndeadCommandsAction : public ShardokAction {
private:
    [[nodiscard]] auto InternalExecute(
            const GameStateW& currentState,
            const std::shared_ptr<RandomGenerator>& generator) const
            -> vector<ActionResult> override;

    const GameStateW& startingGameState;
    const SettingsGetter settings;
    const std::shared_ptr<AvailableCommandsFactory> availableCommandsFactory;

public:
    PerformUndeadCommandsAction(const GameStateW& gameState, const SettingsGetter& settingsGetter)
        : startingGameState(gameState),
          settings(settingsGetter),
          availableCommandsFactory(
                  AvailableCommandsFactory::MakeAvailableCommandsFactory(settingsGetter)){};
};
}  // namespace shardok

#endif  // EAGLE0_PERFORMUNDEADCOMMANDSACTION_HPP
