//
// Created by Dan Crosby on 3/21/21.
//

#ifndef EAGLE0_UNDEADFROZENACTION_HPP
#define EAGLE0_UNDEADFROZENACTION_HPP

#include <utility>

#include "src/main/cpp/net/eagle0/shardok/library/ShardokAction.hpp"
#include "src/main/flatbuffer//net/eagle0/shardok/storage/unit.hpp"

namespace shardok {

using Unit = net::eagle0::shardok::storage::fb::Unit;

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

    // FIXME: this is OK for now since it's only called from the Freeze factory, but it really
    // shouldn't be holding onto the pointer like this
    const Unit* occupant;

public:
    explicit UndeadFrozenAction(const Unit* occupant) : occupant(occupant){};
};
}  // namespace shardok

#endif  // EAGLE0_UNDEADFROZENACTION_HPP
