Interface IGameService

All Known Implementing Classes:
GameService, GameServiceVs

public interface IGameService
Interface for the game service. Specifies the methods that the game service should implement. These include methods for setting difficulty, resetting the game, moving players, getting submodules, and providing path hints.
  • Method Details

    • setDifficulty

      void setDifficulty(Difficulty difficulty)
      Sets the game difficulty.
      Parameters:
      difficulty - The difficulty level to set.
    • resetGame

      void resetGame()
      Resets the game to its initial state.
    • movePlayer

      boolean movePlayer(Direction direction)
      Moves the player in the specified direction.
      Parameters:
      direction - The direction to move the player.
      Returns:
      True if the player reached the goal, false otherwise.
    • getPlayerService

      IPlayerService getPlayerService()
      Gets the player service submodule.
      Returns:
      The player service.
    • getAiService

      IAiService getAiService()
      Gets the AI service submodule.
      Returns:
      The AI service.
    • getMazeService

      IMazeService getMazeService()
      Gets the maze service submodule.
      Returns:
      The maze service.
    • getSecondPlayerService

      IPlayerService getSecondPlayerService()
      Gets the second player service submodule.
      Returns:
      The second player service.
    • getHint

      List<int[]> getHint()
      Provides path hints for the player.
      Returns:
      A list of coordinates representing the hint path.
    • moveSecondPlayer

      boolean moveSecondPlayer(Direction direction)
      Moves the second player in the specified direction.
      Parameters:
      direction - The direction to move the second player.
      Returns:
      True if the second player reached the goal, false otherwise.