//
// Created by Dan Crosby on 3/23/20.
//

#ifndef EAGLE0_UNITFILTER_HPP
#define EAGLE0_UNITFILTER_HPP

#include "src/main/cpp/net/eagle0/shardok/library/ShardokCTypes.h"
#include "src/main/cpp/net/eagle0/shardok/library/settings/GameSettings.hpp"
#include "src/main/flatbuffer/net/eagle0/shardok/storage/unit.hpp"
#include "src/main/protobuf/net/eagle0/shardok/api/unit_view.pb.h"

namespace shardok {

using net::eagle0::shardok::api::UnitView;
using Unit = net::eagle0::shardok::storage::fb::Unit;
using std::vector;

[[nodiscard]] auto UnitFilteredForPlayer(
        const SettingsGetter &settings,
        const Unit *unit,
        PlayerId askingPlayer,
        const std::vector<PlayerId> &alliedPids) -> UnitView;

}  // namespace shardok

#endif  // EAGLE0_UNITFILTER_HPP
