Class Reward
- java.lang.Object
-
- page.codeberg.terratactician_expandoria.world.Reward
-
public class Reward extends java.lang.Object
Rewards are small boni collectable with a variable value.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Reward.RewardType
type of a reward.
-
Field Summary
Fields Modifier and Type Field Description CubeCoordinate
coord
coordinate of this reward.static double
RewardFactorMax
max reward metrics factorstatic double
RewardFactorMin
min rewards metrics factorReward.RewardType
type
type of this rewarddouble
value
An assessment of how good a reward is, between 0 und 1.
-
Constructor Summary
Constructors Constructor Description Reward(Reward.RewardType type, double value, CubeCoordinate coord)
Creates a reward
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CubeCoordinate
getCoordinate()
Returns the coordinate of the reward.Reward.RewardType
getType()
Returns the type of an reward.double
getValue()
Returns the dynamic value of a reward.java.lang.String
toString()
-
-
-
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
-
type
public Reward.RewardType type
type of this reward
-
value
public double value
An assessment of how good a reward is, between 0 und 1.
-
coord
public CubeCoordinate coord
coordinate of this reward.
-
-
Constructor Detail
-
Reward
public Reward(Reward.RewardType type, double value, CubeCoordinate coord)
Creates a reward- Parameters:
type
- reward typevalue
- 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 classjava.lang.Object
-
-