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

#ifndef EAGLE0_MOVECOMMANDFACTORY_HPP
#define EAGLE0_MOVECOMMANDFACTORY_HPP

#include <functional>
#include <utility>

#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/flatbuffer/net/eagle0/shardok/storage/hex_map.hpp"
#include "src/main/flatbuffer/net/eagle0/shardok/storage/unit.hpp"

namespace shardok {

using Units = flatbuffers::Vector<const Unit *>;

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

public:
    explicit MoveCommandFactory(const SettingsGetter &settingsGetter) : settings(settingsGetter){};

    void AddAvailableMoveCommands(
            CommandList &existingCommands,
            const vector<PlayerId> &allyPids,
            const Unit *movingUnit,
            ActionPoints remainingActionPoints,
            const HexMap *hexMap,
            const Units *units) const;

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

    [[nodiscard]] auto IncludeInFollowUps() const -> bool override { return false; }
};
}  // namespace shardok

#endif  // EAGLE0_MOVECOMMANDFACTORY_HPP
