HealthPoints class
A representation of a character's Health Point pool
Constructors
- HealthPoints({required int maximum})
Properties
Methods
-
addHealth(
int damage) → int -
Adds
damage
to the current Health of the character and returns the remaining health. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeHealth(
int damage) → int -
Removes
damage
from the current Health of the character and returns the remaining health. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited