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

#ifndef EAGLE0_LIGHTNINGBOLTCOMMANDFACTORY_HPP
#define EAGLE0_LIGHTNINGBOLTCOMMANDFACTORY_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/settings/GameSettings.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/unit/Unit.hpp"

namespace shardok {

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

public:
    explicit LightningBoltCommandFactory(const SettingsGetter &getter);

    [[nodiscard]] auto MakeLightningBoltCommand(const Unit *attacker, const Unit *defender) const
            -> CommandSPtr;

    auto AddAvailableLightningBoltCommands(
            CommandList &existingCommands,
            const Unit *unit,
            ActionPoints remainingActionPoints,
            const Coords &position,
            const HexMap *hexMap,
            const Units *units,
            const vector<PlayerId> &allyPids) const -> void;

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

#endif  // EAGLE0_LIGHTNINGBOLTCOMMANDFACTORY_HPP
