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

#ifndef EAGLE0_AIUNITSCORECALCULATOR_HPP
#define EAGLE0_AIUNITSCORECALCULATOR_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 std::shared_ptr;
using std::vector;

using ScoreValue = double;
class AttackLocations;

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

auto GetRangedAttackBonus(
        const Unit *unit,
        bool isAttacker,
        const HexMap *map,
        const Terrain *terrain,
        const AttackLocations &attackLocations,
        int roundsRemaining,
        const vector<const Unit *> &attackerUnits,
        const vector<const Unit *> &defenderUnits,
        int meteorRange,
        double minVigorToCast) -> double;

auto UnitValue(
        const Unit *unit,
        bool isAttacker,
        const vector<const Unit *> &attackerUnits,
        bool attackerWantsCastles,
        bool includeCastleBonus,
        const vector<const Unit *> &defenderUnits,
        const HexMap *map,
        int roundsRemaining,
        const AttackLocations &locationsThisSideCanAttackFrom,
        const CoordsSet &locationsInDangerFromEnemy,
        const ActionPointDistances *distances,
        const SettingsGetter &settings) -> ScoreValue;

}  // namespace shardok

#endif  // EAGLE0_AIUNITSCORECALCULATOR_HPP
