Class GameResponse

java.lang.Object
com.bdtripp.hauntedhouse.api.GameResponse

public class GameResponse extends Object
Represents the response returned to the client after a command is processed. A GameResponse contains the text produced by the game engine along with the game's current status.
Author:
Brian Tripp
  • Constructor Details

    • GameResponse

      public GameResponse()
      Creates an empty GameResponse.
    • GameResponse

      public GameResponse(String output, GameStatus status)
      Creates a GameResponse and initialize the output and status.
      Parameters:
      output - the output from the GameEngine.
      status - the game's status.
  • Method Details

    • getOutput

      public String getOutput()
      Returns the output from the GameEngine.
      Returns:
      the output.
    • setOutput

      public void setOutput(String output)
      Sets the output from the GameEngine.
      Parameters:
      output - the output.
    • getStatus

      public GameStatus getStatus()
      Returns the status of the game.
      Returns:
      the status.
    • setStatus

      public void setStatus(GameStatus status)
      Sets the status of the game.
      Parameters:
      status - the status.