Package com.bdtripp.hauntedhouse.model
Class Stats
java.lang.Object
com.bdtripp.hauntedhouse.model.Stats
Represents a player's statistics.
Stores and manages values such as health and strength.
- Author:
- Brian Tripp
-
Constructor Summary
ConstructorsConstructorDescriptionStats(int health, int strength) Creates a new Stats object with the specified health and strength values. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the health of the playerintReturns the strength of the playervoidsetHealth(int value) Set the health of the playervoidsetStrength(int value) Set the strength of the player
-
Constructor Details
-
Stats
public Stats(int health, int strength) Creates a new Stats object with the specified health and strength values.- Parameters:
health- the health of the playerstrength- the strength of the player
-
-
Method Details
-
setHealth
public void setHealth(int value) Set the health of the player- Parameters:
value- the value to set
-
getHealth
public int getHealth()Returns the health of the player- Returns:
- the health of the player
-
setStrength
public void setStrength(int value) Set the strength of the player- Parameters:
value- the value to set
-
getStrength
public int getStrength()Returns the strength of the player- Returns:
- the strength of the player
-