Class Stats

java.lang.Object
com.bdtripp.hauntedhouse.model.Stats

public class Stats extends Object
Represents a player's statistics. Stores and manages values such as health and strength.
Author:
Brian Tripp
  • Constructor Summary

    Constructors
    Constructor
    Description
    Stats(int health, int strength)
    Creates a new Stats object with the specified health and strength values.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the health of the player
    int
    Returns the strength of the player
    void
    setHealth(int value)
    Set the health of the player
    void
    setStrength(int value)
    Set the strength of the player

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 player
      strength - 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