//
// Created by Dan Crosby on 2/16/21.
//

#ifndef EAGLE0_ICEANDSNOWADJUSTMENTACTIONFACTORY_HPP
#define EAGLE0_ICEANDSNOWADJUSTMENTACTIONFACTORY_HPP

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

namespace shardok {

using HexMap = net::eagle0::shardok::storage::fb::HexMap;
using Unit = net::eagle0::shardok::storage::fb::Unit;
using Units = flatbuffers::Vector<const Unit *>;
using WeatherFb = net::eagle0::shardok::storage::fb::Weather;

class IceAndSnowAdjustmentActionFactory {
private:
    const SettingsGetter settings;

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

    [[nodiscard]] virtual auto MakeIceAdjustmentAction(
            const HexMap *hexMap,
            const Coords &coords,
            const Units &units,
            const Terrain *terrain,
            int month,
            const WeatherFb *weather) const -> ActionSPtr;

    [[nodiscard]] virtual auto MakeSnowAdjustmentAction(
            const HexMap *hexMap,
            const Coords &coords,
            const Terrain *terrain,
            int month,
            const WeatherFb *weather) const -> ActionSPtr;

    [[nodiscard]] virtual auto MakeIceAndSnowAdjustmentActions(
            const HexMap *hexMap,
            const Units &units,
            int month,
            const WeatherFb *weather) const -> ActionList;
};
}  // namespace shardok

#endif  // EAGLE0_ICEANDSNOWADJUSTMENTACTIONFACTORY_HPP
