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 Summary
Modifier and TypeMethodDescriptionGets the AI service submodule.List<int[]>getHint()Provides path hints for the player.Gets the maze service submodule.Gets the player service submodule.Gets the second player service submodule.booleanmovePlayer(Direction direction) Moves the player in the specified direction.booleanmoveSecondPlayer(Direction direction) Moves the second player in the specified direction.voidResets the game to its initial state.voidsetDifficulty(Difficulty difficulty) Sets the game difficulty.
-
Method Details
-
setDifficulty
Sets the game difficulty.- Parameters:
difficulty- The difficulty level to set.
-
resetGame
void resetGame()Resets the game to its initial state. -
movePlayer
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
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.
-