load("//tools:copts.bzl", "COPTS")

cc_library(
    name = "coordinates",
    srcs = ["Coordinates.cpp"],
    hdrs = ["Coordinates.hpp"],
    copts = COPTS,
    visibility = ["//visibility:public"],
    deps = [
        "//src/main/cpp/net/eagle0/shardok/library:shardok_c_types",
        "//src/main/flatbuffer/net/eagle0/shardok/storage:coords_cc_fbs",
        "//src/main/protobuf/net/eagle0/shardok/common:coords_cc_proto",
    ],
)

cc_library(
    name = "coords_set",
    srcs = [],
    hdrs = ["CoordsSet.hpp"],
    copts = COPTS,
    visibility = ["//visibility:public"],
    deps = [
        "//src/main/cpp/net/eagle0/common:iterable_bitset",
        "//src/main/cpp/net/eagle0/shardok/library/map:coordinates",
        "//src/main/flatbuffer/net/eagle0/shardok/storage:coords_cc_fbs",
        "//src/main/flatbuffer/net/eagle0/shardok/storage:hex_map_cc_fbs",
    ],
)

cc_library(
    name = "hex_map_direction",
    hdrs = ["HexMapDirection.hpp"],
    copts = COPTS,
    visibility = ["//visibility:public"],
    deps = [
        "//src/main/cpp/net/eagle0/common:protobuf_warning_suppression",
        "//src/main/protobuf/net/eagle0/shardok/common:hex_map_direction_cc_proto",
    ],
)

cc_library(
    name = "hex_map_hasher",
    srcs = ["HexMapHasher.cpp"],
    hdrs = ["HexMapHasher.hpp"],
    copts = COPTS,
    visibility = ["//visibility:public"],
    deps = [
        "//src/main/cpp/net/eagle0/common:byte_hasher",
        "//src/main/flatbuffer/net/eagle0/shardok/storage:hex_map_cc_fbs",
    ],
)

cc_library(
    name = "terrain",
    srcs = ["Terrain.cpp"],
    hdrs = ["Terrain.hpp"],
    copts = COPTS,
    visibility = ["//visibility:public"],
    deps = [
        ":tile_modifier",
        "//src/main/flatbuffer/net/eagle0/shardok/storage:terrain_cc_fbs",
        "//src/main/protobuf/net/eagle0/shardok/common:terrain_cc_proto",
    ],
)

cc_library(
    name = "tile_modifier",
    srcs = ["TileModifier.cpp"],
    hdrs = ["TileModifier.hpp"],
    copts = COPTS,
    visibility = ["//visibility:public"],
    deps = [
        "//src/main/flatbuffer/net/eagle0/shardok/storage:tile_modifier_cc_fbs",
        "//src/main/protobuf/net/eagle0/shardok/common:tile_modifier_cc_proto",
    ],
)

cc_library(
    name = "tile_modifier_with_coords",
    srcs = ["TileModifierWithCoords.cpp"],
    hdrs = ["TileModifierWithCoords.hpp"],
    copts = COPTS,
    visibility = ["//visibility:public"],
    deps = [
        ":coordinates",
        ":tile_modifier",
        "//src/main/cpp/net/eagle0/shardok/library/fb_helpers:tile_modifier_helpers",
        "//src/main/protobuf/net/eagle0/shardok/common:tile_modifier_with_coords_cc_proto",
    ],
)
