Package com.bdtripp.hauntedhouse.api
Class GameResponse
java.lang.Object
com.bdtripp.hauntedhouse.api.GameResponse
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 Summary
ConstructorsConstructorDescriptionCreates an empty GameResponse.GameResponse(String output, GameStatus status) Creates a GameResponse and initialize the output and status. -
Method Summary
Modifier and TypeMethodDescriptionReturns the output from the GameEngine.Returns the status of the game.voidSets the output from the GameEngine.voidsetStatus(GameStatus status) Sets the status of the game.
-
Constructor Details
-
GameResponse
public GameResponse()Creates an empty GameResponse. -
GameResponse
Creates a GameResponse and initialize the output and status.- Parameters:
output- the output from the GameEngine.status- the game's status.
-
-
Method Details
-
getOutput
Returns the output from the GameEngine.- Returns:
- the output.
-
setOutput
Sets the output from the GameEngine.- Parameters:
output- the output.
-
getStatus
Returns the status of the game.- Returns:
- the status.
-
setStatus
Sets the status of the game.- Parameters:
status- the status.
-