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

#ifndef EAGLE0_ICEADJUSTMENTACTION_HPP
#define EAGLE0_ICEADJUSTMENTACTION_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/flatbuffer//net/eagle0/shardok/storage/terrain.hpp"
#include "src/main/protobuf/net/eagle0/shardok/common/weather.pb.h"

namespace shardok {

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

class IceAdjustmentAction : 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 adjustment;
    const std::shared_ptr<ShardokAction> fallAction;
    const std::shared_ptr<ShardokAction> frozenAction;

public:
    IceAdjustmentAction(
            Coords coords,
            const Terrain* terrain,
            double adjustment,
            std::shared_ptr<ShardokAction> fallAction,
            std::shared_ptr<ShardokAction> frozenAction);
};
}  // namespace shardok

#endif  // EAGLE0_ICEADJUSTMENTACTION_HPP
