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

cc_library(
    name = "command_factories_list",
    srcs = ["CommandFactoriesList.cpp"],
    hdrs = ["CommandFactoriesList.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":brave_water_command_factory",
        ":build_bridge_command_factory",
        ":challenge_duel_command_factory",
        ":charge_command_factory",
        ":control_command_factory",
        ":extinguish_fire_command_factory",
        ":fear_command_factory",
        ":flee_command_factory",
        ":fortify_command_factory",
        ":freeze_water_command_factory",
        ":hide_command_factory",
        ":holy_wave_command_factory",
        ":lightning_bolt_command_factory",
        ":meteor_start_command_factory",
        ":meteor_target_command_factory",
        ":move_command_factory",
        ":raise_dead_command_factory",
        ":reduce_command_factory",
        ":reinforce_command_factory",
        ":repair_command_factory",
        ":retreat_command_factory",
        ":scout_command_factory",
        ":start_fire_command_factory",
        "//src/main/cpp/net/eagle0/shardok/library/command_factories/archery_command_factory",
        "//src/main/cpp/net/eagle0/shardok/library/command_factories/melee_command_factory",
    ],
)

cc_library(
    name = "brave_water_command_factory",
    srcs = [
        "BraveWaterCommandFactory.cpp",
        "BraveWaterCommandFactory.hpp",
    ],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:brave_water_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
    ],
)

cc_library(
    name = "build_bridge_command_factory",
    srcs = ["BuildBridgeCommandFactory.cpp"],
    hdrs = ["BuildBridgeCommandFactory.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:build_bridge_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:combat_utils",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
    ],
)

cc_library(
    name = "challenge_duel_command_factory",
    srcs = ["ChallengeDuelCommandFactory.cpp"],
    hdrs = ["ChallengeDuelCommandFactory.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands/challenge_duel_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/protobuf/net/eagle0/shardok/api:unit_view_cc_proto",
    ],
)

cc_library(
    name = "charge_command_factory",
    srcs = [
        "ChargeCommandFactory.cpp",
        "ChargeCommandFactory.hpp",
    ],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:charge_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:unit_rest_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:unit_stop_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:combat_utils",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
        "//src/main/cpp/net/eagle0/shardok/library/util:zone_of_control_calculator",
    ],
)

cc_library(
    name = "command_factory",
    hdrs = ["CommandFactory.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:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/flatbuffer/net/eagle0/shardok/storage:hex_map_cc_fbs",
        "//src/main/flatbuffer/net/eagle0/shardok/storage:unit_cc_fbs",
    ],
)

cc_library(
    name = "control_command_factory",
    srcs = [
        "ControlCommandFactory.cpp",
        "ControlCommandFactory.hpp",
    ],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:control_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:dismiss_unit_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:release_unit_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:combat_utils",
    ],
)

cc_library(
    name = "extinguish_fire_command_factory",
    srcs = ["ExtinguishFireCommandFactory.cpp"],
    hdrs = ["ExtinguishFireCommandFactory.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:fire_utils",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:extinguish_fire_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
    ],
)

cc_library(
    name = "fear_command_factory",
    srcs = ["FearCommandFactory.cpp"],
    hdrs = ["FearCommandFactory.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:fear_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
    ],
)

cc_library(
    name = "flee_command_factory",
    srcs = ["FleeCommandFactory.cpp"],
    hdrs = ["FleeCommandFactory.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:become_outlaw_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:flee_command",
        "//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_map_utils",
    ],
)

cc_library(
    name = "fortify_command_factory",
    srcs = ["FortifyCommandFactory.cpp"],
    hdrs = ["FortifyCommandFactory.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:fortify_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
    ],
)

cc_library(
    name = "freeze_water_command_factory",
    srcs = ["FreezeWaterCommandFactory.cpp"],
    hdrs = ["FreezeWaterCommandFactory.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:freeze_water_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
    ],
)

cc_library(
    name = "hide_command_factory",
    srcs = ["HideCommandFactory.cpp"],
    hdrs = ["HideCommandFactory.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:hide_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
        "//src/main/cpp/net/eagle0/shardok/library/util:zone_of_control_calculator",
        "//src/main/cpp/net/eagle0/shardok/library/view_filters:unit_filter",
    ],
)

cc_library(
    name = "holy_wave_command_factory",
    srcs = ["HolyWaveCommandFactory.cpp"],
    hdrs = ["HolyWaveCommandFactory.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:holy_wave_command",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
    ],
)

cc_library(
    name = "lightning_bolt_command_factory",
    srcs = ["LightningBoltCommandFactory.cpp"],
    hdrs = ["LightningBoltCommandFactory.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:lightning_bolt_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
    ],
)

cc_library(
    name = "meteor_start_command_factory",
    srcs = ["MeteorStartCommandFactory.cpp"],
    hdrs = ["MeteorStartCommandFactory.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:meteor_start_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:meteor_range_coords",
    ],
)

cc_library(
    name = "meteor_target_command_factory",
    srcs = [
        "MeteorTargetCommandFactory.cpp",
        "MeteorTargetCommandFactory.hpp",
    ],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:meteor_cancel_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:meteor_target_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:meteor_range_coords",
    ],
)

cc_library(
    name = "move_command_factory",
    srcs = ["MoveCommandFactory.cpp"],
    hdrs = ["MoveCommandFactory.hpp"],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:move_command",
    ],
)

cc_library(
    name = "raise_dead_command_factory",
    srcs = [
        "RaiseDeadCommandFactory.cpp",
        "RaiseDeadCommandFactory.hpp",
    ],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library/command_factories:__pkg__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:raise_dead_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
    ],
)

cc_library(
    name = "reduce_command_factory",
    srcs = [
        "ReduceCommandFactory.cpp",
        "ReduceCommandFactory.hpp",
    ],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library/command_factories:__pkg__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:reduce_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
    ],
)

cc_library(
    name = "reinforce_command_factory",
    srcs = [
        "ReinforceCommandFactory.cpp",
        "ReinforceCommandFactory.hpp",
    ],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library/command_factories:__pkg__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:reinforce_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
    ],
)

cc_library(
    name = "repair_command_factory",
    srcs = [
        "RepairCommandFactory.cpp",
        "RepairCommandFactory.hpp",
    ],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library/command_factories:__pkg__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:repair_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
    ],
)

cc_library(
    name = "retreat_command_factory",
    srcs = [
        "RetreatCommandFactory.cpp",
        "RetreatCommandFactory.hpp",
    ],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:retreat_command",
        "//src/main/cpp/net/eagle0/shardok/library/map:coordinates",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
    ],
)

cc_library(
    name = "scout_command_factory",
    srcs = [
        "ScoutCommandFactory.cpp",
        "ScoutCommandFactory.hpp",
    ],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library/command_factories:__pkg__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:scout_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
    ],
)

cc_library(
    name = "start_fire_command_factory",
    srcs = [
        "StartFireCommandFactory.cpp",
        "StartFireCommandFactory.hpp",
    ],
    copts = COPTS,
    visibility = [
        "//src/main/cpp/net/eagle0/shardok/library:__subpackages__",
        "//src/test/cpp/net/eagle0/shardok/library:__subpackages__",
    ],
    deps = [
        ":command_factory",
        "//src/main/cpp/net/eagle0/shardok/library:fire_utils",
        "//src/main/cpp/net/eagle0/shardok/library:shardok_command",
        "//src/main/cpp/net/eagle0/shardok/library/commands:start_fire_command",
        "//src/main/cpp/net/eagle0/shardok/library/settings:game_settings",
        "//src/main/cpp/net/eagle0/shardok/library/util:hex_map_utils",
    ],
)
