Class GameService

java.lang.Object
com.bdtripp.hauntedhouse.service.GameService

@SessionScope @Service public class GameService extends Object
Provides the web-facing game service layer. Acts as the bridge between the controller and the game engine for the web version.
Author:
Brian Tripp
  • Constructor Details

    • GameService

      public GameService()
      Creates a new GameService instance.
  • Method Details

    • startGame

      public GameResponse startGame()
      Starts a new game session and returns the initial response.
      Returns:
      a response containing a welcome message and status of the game
    • execute

      public GameResponse execute(GameRequest request)
      Processes a player command and returns the resulting game output and status.
      Parameters:
      request - the request containing the player command
      Returns:
      a response containing output and status of the game