//
// Created by Dan Crosby on 4/7/21.
//

#ifndef EAGLE0_SHARDOK_AI_AI_SCORE_UTILITIES_HPP
#define EAGLE0_SHARDOK_AI_AI_SCORE_UTILITIES_HPP

#include <vector>

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

namespace shardok {

using ScoreValue = double;

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

[[nodiscard]] auto HasAttachedHeroWithProfession(
        const Unit *unit,
        net::eagle0::shardok::storage::fb::Profession profession) -> bool;

[[nodiscard]] auto CastleClaimCapableAttackerUnitCount(const GameStateW &gameState) -> int;
[[nodiscard]] auto PlayerInfoForPid(const GameStateW &gameState, PlayerId pid)
        -> const PlayerInfo *;

}  // namespace shardok

#endif  // EAGLE0_SHARDOK_AI_AI_SCORE_UTILITIES_HPP
