Class PlayerMetric
- java.lang.Object
-
- bytemusketeers.heslingtonhustle.metrics.PlayerMetric
-
- All Implemented Interfaces:
MetricEntry
class PlayerMetric extends java.lang.Object implements MetricEntry
APlayerMetric
represents aMetricEntry
pertaining 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 int
STANDARD_INCREMENT
The standard amount by which thevalue
may be increased or decreased.private java.lang.Integer
value
The 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) void
decrementMetric(int multiplier)
Decrements thevalue
by the given multiple of theSTANDARD_INCREMENT
java.lang.String
getValue()
Retrieves theInteger
associated with thePlayerMetric
(package private) void
incrementMetric(int multiplier)
Increments thevalue
by the given multiple of theSTANDARD_INCREMENT
-
-
-
Field Detail
-
STANDARD_INCREMENT
private static final int STANDARD_INCREMENT
The standard amount by which thevalue
may 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 theInteger
associated with thePlayerMetric
- Specified by:
getValue
in interfaceMetricEntry
- Returns:
- A
String
representation of thevalue
-
incrementMetric
void incrementMetric(int multiplier)
Increments thevalue
by the given multiple of theSTANDARD_INCREMENT
- Parameters:
multiplier
- An integer multiplier of theSTANDARD_INCREMENT
-
decrementMetric
void decrementMetric(int multiplier)
Decrements thevalue
by the given multiple of theSTANDARD_INCREMENT
- Parameters:
multiplier
- An integer multiplier of theSTANDARD_INCREMENT
-
-