//
// Created by Dan Crosby on 3/11/20.
//

#ifndef EAGLE0_BRAVEWATERCOMMANDFACTORY_HPP
#define EAGLE0_BRAVEWATERCOMMANDFACTORY_HPP

#include "src/main/cpp/net/eagle0/shardok/library/ShardokCommand.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/command_factories/CommandFactory.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/map/Coordinates.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/settings/GameSettings.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/unit/Unit.hpp"

namespace shardok {

class BraveWaterCommandFactory : public CommandFactory {
private:
    const SettingsGetter settings;

    [[nodiscard]] auto MakeBraveWaterCommand(
            const Unit *actor,
            const std::optional<UnitId> &ambusher,
            const Coords &target,
            const WeatherFb *weather) const -> CommandSPtr;

public:
    explicit BraveWaterCommandFactory(const SettingsGetter &getter);
    virtual ~BraveWaterCommandFactory() = default;

    void AddAvailableBraveWaterCommands(
            shardok::CommandList &commands,
            const Unit *unit,
            shardok::ActionPoints remainingActionPoints,
            const Coords &position,
            const WeatherFb *weather,
            const HexMap *hexMap,
            const Units *units) const;

    void AddAvailableCommands(CommandList &commands, const CommandParams &params) const override;
};
}  // namespace shardok

#endif  // EAGLE0_BRAVEWATERCOMMANDFACTORY_HPP
