Class Reward


  • public class Reward
    extends java.lang.Object
    Rewards are small boni collectable with a variable value.
    • Field Detail

      • RewardFactorMax

        public static final double RewardFactorMax
        max reward metrics factor
        See Also:
        Constant Field Values
      • RewardFactorMin

        public static final double RewardFactorMin
        min rewards metrics factor
        See Also:
        Constant Field Values
      • value

        public double value
        An assessment of how good a reward is, between 0 und 1.
    • Constructor Detail

      • Reward

        public Reward​(Reward.RewardType type,
                      double value,
                      CubeCoordinate coord)
        Creates a reward
        Parameters:
        type - reward type
        value - reward value (in: [0, 1])
        coord - coordinate of the reward
    • Method Detail

      • getType

        public Reward.RewardType getType()
        Returns the type of an reward.
        Returns:
        type of the reward
      • getValue

        public double getValue()
        Returns the dynamic value of a reward. When collected the current metrics rate multiplied by value gets collected. In addition to that each reward has a small static resource amount. This amount is unknown to the player/bot.
        Returns:
        percentage of metrics rate player will get: in [0, infty)
      • getCoordinate

        public CubeCoordinate getCoordinate()
        Returns the coordinate of the reward. This Coordinate is needed to collect this reward.
        Returns:
        coordinate of the reward
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object