package de.frajul.endlessroll.entities.tools;

/**
 * Created by Julian on 09.06.2017.
 */

public class ToolUpgrade {

    private ToolUpgradeType type;
    private float first, last;

    public ToolUpgrade(ToolUpgradeType type, float first, float last) {
        this.type = type;
        this.first = first;
        this.last = last;
    }

    public ToolUpgradeType getType() {
        return type;
    }

    public float getValueAtLevel(int level, int maxLevel) {
        float step = (last - first) / ((float) maxLevel - 1);
        return first + (level - 1) * step;
    }

}
