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

cc_library(
    name = "action_result_filter",
    srcs = ["ActionResultFilter.cpp"],
    hdrs = ["ActionResultFilter.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":unit_filter",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/view_filters:game_state_filter",
        "//src/main/cpp/net/eagle0/shardok/library/view_filters:game_state_view_differ",
        "//src/main/protobuf/net/eagle0/shardok/api:action_result_view_cc_proto",
        "//src/main/protobuf/net/eagle0/shardok/storage:action_result_cc_proto",
    ],
)

cc_library(
    name = "game_state_view_differ",
    srcs = ["GameStateViewDiffer.cpp"],
    hdrs = ["GameStateViewDiffer.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":unit_filter",
        "//src/main/cpp/net/eagle0/shardok/library/map:tile_modifier_with_coords",
        "//src/main/protobuf/net/eagle0/shardok/api:game_state_view_cc_proto",
        "//src/main/protobuf/net/eagle0/shardok/storage:action_result_cc_proto",
    ],
)

cc_library(
    name = "game_state_filter",
    srcs = ["GameStateFilter.cpp"],
    hdrs = ["GameStateFilter.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":unit_filter",
        "//src/main/cpp/net/eagle0/shardok/library/fb_helpers:game_state_helpers",
        "//src/main/cpp/net/eagle0/shardok/library/fb_helpers:hex_map_helpers",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:player_utils",
        "//src/main/protobuf/net/eagle0/shardok/api:game_state_view_cc_proto",
    ],
)

cc_library(
    name = "hero_filter",
    srcs = ["HeroFilter.cpp"],
    hdrs = ["HeroFilter.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        "//src/main/cpp/net/eagle0/shardok/library/map:coordinates",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/flatbuffer/net/eagle0/shardok/storage:hero_cc_fbs",
        "//src/main/protobuf/net/eagle0/shardok/api:unit_view_cc_proto",
    ],
)

cc_library(
    name = "odds_filter",
    srcs = ["OddsFilter.cpp"],
    hdrs = ["OddsFilter.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        "//src/main/cpp/net/eagle0/shardok/library:percentile_roll_odds",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_c_types",
        "//src/main/protobuf/net/eagle0/shardok/api:odds_view_cc_proto",
        "//src/main/protobuf/net/eagle0/shardok/storage:odds_cc_proto",
    ],
)

cc_library(
    name = "game_state_guesser",
    srcs = ["GameStateGuesser.cpp"],
    hdrs = ["GameStateGuesser.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/ai:__pkg__",
        "//src/main/cpp/net/eagle0/shardok/library:__pkg__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        "//src/main/cpp/net/eagle0/shardok/library/fb_helpers:flatbuffer_wrapper",
        "//src/main/cpp/net/eagle0/shardok/library/fb_helpers:game_state_helpers",
        "//src/main/cpp/net/eagle0/shardok/library/map:coordinates",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_cube_utils",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
        "//src/main/flatbuffer/net/eagle0/shardok/storage:game_state_cc_fbs",
        "//src/main/protobuf/net/eagle0/shardok/api:game_state_view_cc_proto",
    ],
)

cc_library(
    name = "unit_filter",
    srcs = ["UnitFilter.cpp"],
    hdrs = ["UnitFilter.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":hero_filter",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_c_types",
        "//src/main/cpp/net/eagle0/shardok/library/map:coordinates",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/unit",
        "//src/main/protobuf/net/eagle0/shardok/api:unit_view_cc_proto",
        "//src/main/protobuf/net/eagle0/shardok/common:command_type_cc_proto",
    ],
)
