//
// Created by Dan Crosby on 8/31/23.
//

#ifndef EAGLE0_SHARDOK_AI_AI_MINIMUM_DISTANCE_AND_TARGET_HPP
#define EAGLE0_SHARDOK_AI_AI_MINIMUM_DISTANCE_AND_TARGET_HPP

#include "src/main/cpp/net/eagle0/shardok/library/action_point_distances/ActionPointDistances.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/map/CoordsSet.hpp"
#include "src/main/protobuf/net/eagle0/shardok/common/coords.pb.h"

namespace shardok {

using net::eagle0::shardok::storage::fb::Coords;

struct CoordsAndDistance {
    Coords coords;
    int distance;
};

[[nodiscard]] auto MinimumDistanceAndTarget(
        const ActionPointDistances *apd,
        const Coords &origin,
        const CoordsSet &destinations) -> CoordsAndDistance;

[[nodiscard]] auto MinimumDistance(
        const ActionPointDistances *apd,
        const Coords &origin,
        const CoordsSet &destinations) -> int;

}  // namespace shardok

#endif  // EAGLE0_SHARDOK_AI_AI_MINIMUM_DISTANCE_AND_TARGET_HPP
