load("@rules_cc//cc:defs.bzl", "cc_library")
load("//tools:copts.bzl", "COPTS")

cc_library(
    name = "action_result_applier",
    srcs = ["ActionResultApplier.cpp"],
    hdrs = ["ActionResultApplier.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library/action_result_applier:__pkg__",
    ],
    deps = [
        ":game_state_copier",
        ":unit_helpers",
        "//src/main/cpp/net/eagle0/shardok/library:game_state_w",
        "//src/main/cpp/net/eagle0/shardok/library/map:hex_map_hasher",
        "//src/main/cpp/net/eagle0/shardok/library/unit",
        "//src/main/cpp/net/eagle0/shardok/library/util:action_result_flatbuffer_helpers",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
        "//src/main/protobuf/net/eagle0/shardok/storage:action_result_cc_proto",
    ],
)

cc_library(
    name = "game_state_copier",
    srcs = ["GameStateCopier.cpp"],
    hdrs = ["GameStateCopier.hpp"],
    copts = COPTS,
    deps = [
        "//src/main/cpp/net/eagle0/shardok/library:game_state_w",
    ],
)

cc_library(
    name = "unit_helpers",
    srcs = ["UnitHelpers.cpp"],
    hdrs = ["UnitHelpers.hpp"],
    copts = COPTS,
    visibility = [
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        "//src/main/flatbuffer/net/eagle0/shardok/storage:unit_cc_fbs",
    ],
)
