//
//  AvailableCommandsFactory.hpp
//  eagle0_engine
//
//  Created by Dan Crosby on 12/31/18.
//  Copyright © 2018 none. All rights reserved.
//

#ifndef AvailableCommandsFactory_hpp
#define AvailableCommandsFactory_hpp

#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/settings/GameSettings.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/unit/Unit.hpp"

namespace shardok {

using std::optional;
using std::unique_ptr;
using UnitIdOptional = optional<UnitId>;

class AvailableCommandsFactory {
public:
    static auto MakeAvailableCommandsFactory(const SettingsGetter &settingsGetter)
            -> unique_ptr<AvailableCommandsFactory>;

    virtual ~AvailableCommandsFactory() = default;

    [[nodiscard]] virtual auto GetPlayerSetupCommands(
            const GameStateW &gameState,
            PlayerId playerId) const -> CommandListSPtr = 0;

    [[nodiscard]] virtual auto GetAvailableCommands(
            const GameStateW &gameState,
            PlayerId player,
            bool includeFollowUps) const -> CommandListSPtr = 0;
};
}  // namespace shardok

#endif /* AvailableCommandsFactory_hpp */
