//
//  MeleeActionFactory.hpp
//  eagle0_engine
//
//  Created by Dan Crosby on 1/3/19.
//  Copyright © 2019 none. All rights reserved.
//

#ifndef MeleeActionFactory_hpp
#define MeleeActionFactory_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/util/CombatUtils.hpp"

namespace shardok {

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

public:
    explicit MeleeCommandFactory(const SettingsGetter &getter);

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

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

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

#endif /* MeleeActionFactory_hpp */
