// Path: core/src/me/minidigger/projecttd/systems/TurretSystem.java
// public interface TargetSelectionStrategy {
//     TargetSelectionStrategy NEAREST = (current, data, dst, target) -> {
//         boolean exp = data == -1 || dst <= data;
//         return exp ? Pair.of(target, dst) : Pair.of(current, data);
//     };
// 
//     TargetSelectionStrategy FURTHEST = (current, data, dst, target) -> {
//         boolean exp = data == -1 || dst > data;
//         return exp ? Pair.of(target, dst) : Pair.of(current, data);
//     };
// 
//     TargetSelectionStrategy FIRST = (current, data, dst, target) -> {
//         float tilesToGoal = pathM.get(target).tilesToGoal;
//         boolean exp = data == -1 || tilesToGoal <= data;
//         return exp ? Pair.of(target, tilesToGoal) : Pair.of(current, data);
//     };
// 
//     TargetSelectionStrategy LAST = (current, data, dst, target) -> {
//         float tilesToGoal = pathM.get(target).tilesToGoal;
//         boolean exp = data == -1 || tilesToGoal > data;
//         return exp ? Pair.of(target, tilesToGoal) : Pair.of(current, data);
//     };
// 
//     TargetSelectionStrategy MIN_HEALTH = (current, data, dst, target) -> {
//         float health = healthM.get(target).health;
//         boolean exp = data == -1 || health <= data;
//         return exp ? Pair.of(target, health) : Pair.of(current, data);
//     };
// 
//     TargetSelectionStrategy MAX_HEALTH = (current, data, dst, target) -> {
//         float health = healthM.get(target).health;
//         boolean exp = data == -1 || health > data;
//         return exp ? Pair.of(target, health) : Pair.of(current, data);
//     };
// 
//     Pair<Entity, Float> calculate(Entity currentFav, float currentFavData, float dst, Entity target);
// }


import com.badlogic.ashley.core.Component;
import com.badlogic.ashley.core.Entity;
import com.badlogic.gdx.utils.Pool.Poolable;
import me.minidigger.projecttd.systems.TurretSystem.TargetSelectionStrategy;
package me.minidigger.projecttd.components;


/**
 * Created by Martin on 29/04/2017.
 */
public class TurretComponent implements Component, Poolable {

    public Entity target;
    public float range = 2;
    public float attackSpeed = 1;
// Path: core/src/me/minidigger/projecttd/systems/TurretSystem.java
// public interface TargetSelectionStrategy {
//     TargetSelectionStrategy NEAREST = (current, data, dst, target) -> {
//         boolean exp = data == -1 || dst <= data;
//         return exp ? Pair.of(target, dst) : Pair.of(current, data);
//     };
// 
//     TargetSelectionStrategy FURTHEST = (current, data, dst, target) -> {
//         boolean exp = data == -1 || dst > data;
//         return exp ? Pair.of(target, dst) : Pair.of(current, data);
//     };
// 
//     TargetSelectionStrategy FIRST = (current, data, dst, target) -> {
//         float tilesToGoal = pathM.get(target).tilesToGoal;
//         boolean exp = data == -1 || tilesToGoal <= data;
//         return exp ? Pair.of(target, tilesToGoal) : Pair.of(current, data);
//     };
// 
//     TargetSelectionStrategy LAST = (current, data, dst, target) -> {
//         float tilesToGoal = pathM.get(target).tilesToGoal;
//         boolean exp = data == -1 || tilesToGoal > data;
//         return exp ? Pair.of(target, tilesToGoal) : Pair.of(current, data);
//     };
// 
//     TargetSelectionStrategy MIN_HEALTH = (current, data, dst, target) -> {
//         float health = healthM.get(target).health;
//         boolean exp = data == -1 || health <= data;
//         return exp ? Pair.of(target, health) : Pair.of(current, data);
//     };
// 
//     TargetSelectionStrategy MAX_HEALTH = (current, data, dst, target) -> {
//         float health = healthM.get(target).health;
//         boolean exp = data == -1 || health > data;
//         return exp ? Pair.of(target, health) : Pair.of(current, data);
//     };
// 
//     Pair<Entity, Float> calculate(Entity currentFav, float currentFavData, float dst, Entity target);
// }


// Path: core/src/me/minidigger/projecttd/components/TurretComponent.java
import com.badlogic.ashley.core.Component;
import com.badlogic.ashley.core.Entity;
import com.badlogic.gdx.utils.Pool.Poolable;
import me.minidigger.projecttd.systems.TurretSystem.TargetSelectionStrategy;

package me.minidigger.projecttd.components;


/**
 * Created by Martin on 29/04/2017.
 */
public class TurretComponent implements Component, Poolable {

    public Entity target;
    public float range = 2;
    public float attackSpeed = 1;
    public TargetSelectionStrategy strategy = TargetSelectionStrategy.FIRST;