Class Reward
- java.lang.Object
-
- page.codeberg.terratactician_expandoria.world.Reward
-
public class Reward extends java.lang.ObjectRewards are small boni collectable with a variable value.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classReward.RewardTypetype of a reward.
-
Field Summary
Fields Modifier and Type Field Description CubeCoordinatecoordcoordinate of this reward.static doubleRewardFactorMaxmax reward metrics factorstatic doubleRewardFactorMinmin rewards metrics factorReward.RewardTypetypetype of this rewarddoublevalueAn 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 CubeCoordinategetCoordinate()Returns the coordinate of the reward.Reward.RewardTypegetType()Returns the type of an reward.doublegetValue()Returns the dynamic value of a reward.java.lang.StringtoString()
-
-
-
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:
toStringin classjava.lang.Object
-
-