Class PlayerMetric
- java.lang.Object
-
- bytemusketeers.heslingtonhustle.metrics.PlayerMetric
-
- All Implemented Interfaces:
MetricEntry
class PlayerMetric extends java.lang.Object implements MetricEntry
APlayerMetricrepresents aMetricEntrypertaining to the player-controlled character to be managed by theMetricController.- Author:
- ENG1 Team 23 (Cohort 3)
-
-
Field Summary
Fields Modifier and Type Field Description private static intSTANDARD_INCREMENTThe standard amount by which thevaluemay be increased or decreased.private java.lang.IntegervalueThe integral value of thePlayerMetric
-
Constructor Summary
Constructors Constructor Description PlayerMetric()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voiddecrementMetric(int multiplier)Decrements thevalueby the given multiple of theSTANDARD_INCREMENTjava.lang.StringgetValue()Retrieves theIntegerassociated with thePlayerMetric(package private) voidincrementMetric(int multiplier)Increments thevalueby the given multiple of theSTANDARD_INCREMENT
-
-
-
Field Detail
-
STANDARD_INCREMENT
private static final int STANDARD_INCREMENT
The standard amount by which thevaluemay be increased or decreased. Any integer multiple of this value may also be used.
-
value
private java.lang.Integer value
The integral value of thePlayerMetric
-
-
Method Detail
-
getValue
public java.lang.String getValue()
Retrieves theIntegerassociated with thePlayerMetric- Specified by:
getValuein interfaceMetricEntry- Returns:
- A
Stringrepresentation of thevalue
-
incrementMetric
void incrementMetric(int multiplier)
Increments thevalueby the given multiple of theSTANDARD_INCREMENT- Parameters:
multiplier- An integer multiplier of theSTANDARD_INCREMENT
-
decrementMetric
void decrementMetric(int multiplier)
Decrements thevalueby the given multiple of theSTANDARD_INCREMENT- Parameters:
multiplier- An integer multiplier of theSTANDARD_INCREMENT
-
-