//
// Created by Dan Crosby on 11/29/20.
//

#ifndef EAGLE0_SHARDOK_LIBRARY_UTIL_PLAYER_UTILS_HPP
#define EAGLE0_SHARDOK_LIBRARY_UTIL_PLAYER_UTILS_HPP

#include <vector>

#include "src/main/cpp/net/eagle0/shardok/library/ShardokCTypes.h"
#include "src/main/flatbuffer/net/eagle0/shardok/storage/game_state.hpp"

namespace shardok {

using PlayerInfoFb = net::eagle0::shardok::storage::fb::PlayerInfo;
using GameState = net::eagle0::shardok::storage::fb::GameState;

[[nodiscard]] auto PlayerIsDefender(const GameState *gameState, int playerId) -> bool;
[[nodiscard]] auto
NextPlayerId(const GameState *gameState, PlayerId pid, bool allowUncontrolled = true) -> PlayerId;
[[nodiscard]] auto AlliedPids(const GameState *gameState, int playerId) -> std::vector<PlayerId>;

}  // namespace shardok

#endif  // EAGLE0_SHARDOK_LIBRARY_UTIL_PLAYER_UTILS_HPP
