//
// Created by Dan Crosby on 5/31/20.
//

#ifndef EAGLE0_UNITSTOPCOMMAND_HPP
#define EAGLE0_UNITSTOPCOMMAND_HPP

#include "src/main/cpp/net/eagle0/shardok/library/ShardokCommand.hpp"

namespace shardok {
class UnitStopCommand : public ShardokCommand {
protected:
    auto InternalExecute(
            const GameStateW& currentState,
            const std::shared_ptr<RandomGenerator>& generator) const
            -> vector<ActionResult> override;

    const UnitId actorId;

public:
    explicit UnitStopCommand(const PlayerId playerId, const UnitId actorId)
        : ShardokCommand(playerId),
          actorId(actorId){};
    ~UnitStopCommand() override = default;

    [[nodiscard]] auto GetCommandType() const -> CommandType override {
        return net::eagle0::shardok::common::UNIT_STOP_COMMAND;
    }

    [[nodiscard]] auto GetCommandProto() const -> CommandProto override;
    [[nodiscard]] auto CanBeFollowUp() const -> bool override { return false; };
    [[nodiscard]] auto CanDoAfterMovingIntoZoc() const -> bool override { return true; }
    [[nodiscard]] auto IsRequiredToEndTurn() const -> bool override { return true; }
};
}  // namespace shardok

#endif  // EAGLE0_UNITSTOPCOMMAND_HPP
