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

#ifndef EAGLE0_ENDTURNCOMMAND_HPP
#define EAGLE0_ENDTURNCOMMAND_HPP

#include <utility>

#include "src/main/cpp/net/eagle0/shardok/library/GameStateW.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/ShardokCommand.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/action_factories/MeteorCastActionFactory.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/settings/GameSettings.hpp"

namespace shardok {

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

    const GameStateW& gameState;
    const SettingsGetter settings;

public:
    EndTurnCommand(
            const PlayerId pid,
            const GameStateW& gameState,
            const SettingsGetter& settingsGetter)
        : ShardokCommand(pid),
          gameState(gameState),
          settings(settingsGetter){};

    ~EndTurnCommand() override = default;

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

    [[nodiscard]] auto GetCommandProto() const -> CommandProto override;
};
}  // namespace shardok
#endif  // EAGLE0_ENDTURNCOMMAND_HPP
