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

#ifndef EAGLE0_SNOWADJUSTMENTACTION_HPP
#define EAGLE0_SNOWADJUSTMENTACTION_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/terrain.hpp"

namespace shardok {

using Terrain = net::eagle0::shardok::storage::fb::Terrain;
using WeatherFb = net::eagle0::shardok::storage::fb::Weather;

class SnowAdjustmentAction : public ShardokAction {
private:
    [[nodiscard]] auto InternalExecute(
            const GameStateW& currentState,
            const std::shared_ptr<RandomGenerator>& generator) const
            -> vector<ActionResult> override;

    const Coords coords;
    const Terrain terrain;
    const double tempAdjustment;
    const double conditionsAdjustment;
    const bool varyConditionsAdjustment;
    const double fireAdjustment;

public:
    SnowAdjustmentAction(
            Coords coords,
            const Terrain* terrain,
            int8_t averageTemp,
            const WeatherFb& weather,
            const SettingsGetter& settings);
};
}  // namespace shardok

#endif  // EAGLE0_SNOWADJUSTMENTACTION_HPP
