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

#ifndef ZoneOfControlCalculator_hpp
#define ZoneOfControlCalculator_hpp

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

namespace shardok {
using net::eagle0::shardok::api::UnitView;

[[nodiscard]] auto
ExertsZoneOfControl(const SettingsGetter &settings, const Unit *unit, PlayerId toPid) -> bool;

[[nodiscard]] auto ExertsZoneOfControl(const SettingsGetter &settings, const UnitView &unit)
        -> bool;

[[nodiscard]] auto TilesInEnemyZoc(
        const SettingsGetter &settings,
        PlayerId playerId,
        const Units *units,
        const HexMap *hexMap,
        const vector<PlayerId> &allyPids) -> CoordsSet;

[[nodiscard]] auto IsInEnemyZoc(
        const SettingsGetter &settings,
        PlayerId playerId,
        const Units *units,
        const HexMap *hexMap,
        const vector<PlayerId> &allyPids,
        const Coords &coords) -> bool;

[[nodiscard]] auto AttackOrientationForAttack(
        const SettingsGetter &settings,
        PlayerId attackingPlayer,
        const Units *units,
        const HexMap *map,
        const Coords &origin,
        const Coords &destination) -> AttackOrientation;
}  // namespace shardok

#endif /* ZoneOfControlCalculator_hpp */
