//
// Created by Dan Crosby on 5/17/20.
//

#include "MeteorRangeCoords.hpp"

#include "src/main/cpp/net/eagle0/shardok/library/util/HexMapUtils.hpp"

namespace shardok {

auto CoordsInMeteorRange(
        const HexMap *hexMap,
        const Coords &location,
        const SettingsGetter &settings) -> CoordsSet {
    const int meteorRange = settings.Backing().meteor_range();
    CoordsSet coordsInRange(hexMap);

    for (int distance = 1; distance <= meteorRange; distance++) {
        coordsInRange += TilesWithExactDistance(hexMap, location, distance);
    }

    return coordsInRange;
}

}  // namespace shardok