//
// Created by Dan Crosby on 4/7/21.
//

#ifndef EAGLE0_SHARDOK_AI_AI_UNIT_SCORE_CALCULATOR_HPP
#define EAGLE0_SHARDOK_AI_AI_UNIT_SCORE_CALCULATOR_HPP

#include "src/main/cpp/net/eagle0/shardok/library/action_point_distances/ActionPointDistances.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/map/CoordsSet.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/settings/GameSettings.hpp"
#include "src/main/flatbuffer/net/eagle0/shardok/storage/unit.hpp"
#include "src/main/protobuf/net/eagle0/shardok/common/hex_map.pb.h"

namespace shardok {

using net::eagle0::shardok::storage::fb::Unit;
using ScoreValue = double;
class AttackLocations;

[[nodiscard]] auto ContextFreeUnitValue(const Unit *unit) -> ScoreValue;

[[nodiscard]] auto GetRangedAttackBonus(
        const Unit *unit,
        bool isAttacker,
        const HexMap *map,
        const Terrain *terrain,
        const AttackLocations &attackLocations,
        int roundsRemaining,
        const std::vector<const Unit *> &attackerUnits,
        const std::vector<const Unit *> &defenderUnits,
        int meteorRange,
        double minVigorToCast,
        ActionPoints archeryActionPointCost = 0) -> double;

[[nodiscard]] auto UnitValue(
        const Unit *unit,
        bool isAttacker,
        const std::vector<const Unit *> &attackerUnits,
        bool attackerWantsCastles,
        bool includeCastleBonus,
        const std::vector<const Unit *> &defenderUnits,
        const HexMap *map,
        int roundsRemaining,
        const AttackLocations &locationsThisSideCanAttackFrom,
        const CoordsSet &locationsInDangerFromEnemy,
        const ActionPointDistances *distances,
        int meteorRange,
        double meteorCastVigorCost,
        ActionPoints archeryActionPointCost = 0) -> ScoreValue;

}  // namespace shardok

#endif  // EAGLE0_SHARDOK_AI_AI_UNIT_SCORE_CALCULATOR_HPP
