//
// Created by Dan Crosby on 5/16/20.
//

#ifndef EAGLE0_ARCHERYCOMMANDFACTORY_HPP
#define EAGLE0_ARCHERYCOMMANDFACTORY_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 ArcheryCommandFactory : public CommandFactory {
private:
    const SettingsGetter settings;

public:
    explicit ArcheryCommandFactory(const SettingsGetter &getter);
    ~ArcheryCommandFactory() override = default;

    [[nodiscard]] auto MakeArcheryCommand(
            const Unit *attacker,
            const Unit *defender,
            const Terrain &defenderTerrain) const -> CommandSPtr;

    void AddAvailableCommands(CommandList &commands, const CommandParams &params) const override;

    void AddAvailableArcheryCommands(
            CommandList &commands,
            const Unit *unit,
            ActionPoints remainingActionPoints,
            const Coords &position,
            const WeatherFb *weather,
            const HexMap *hexMap,
            const Units *units,
            const vector<PlayerId> &allyPids) const;
};
}  // namespace shardok

#endif  // EAGLE0_ARCHERYCOMMANDFACTORY_HPP
