Interface IGameController

All Known Implementing Classes:
GameController, GameControllerVs

public interface IGameController
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the current difficulty level of the game.
    Gets the game service, which handles game logic and operations.
    void
    Handles key press events to control game actions.
    void
    Resets the game to its initial state.
    void
    setDifficulty(String difficulty)
    Sets the difficulty level of the game.
    void
    Sets the game view, which is responsible for the user interface.
    void
    Displays the failure view when the player loses the game.
    void
    Displays a hint to the player during the game.
    void
    Displays the preparation view before starting the game.
    void
    Displays the main game view where the game is played.
    void
    Displays the selection view where users can choose game settings.
    void
    Displays the victory view when the player wins the game.
    void
    Starts the AI movement in the game.
    void
    Starts the game by initializing necessary components and setting up the initial state.
  • Method Details

    • startGame

      void startGame()
      Starts the game by initializing necessary components and setting up the initial state.
    • resetGame

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

      void handleKeyPress(String key)
      Handles key press events to control game actions.
      Parameters:
      key - The key pressed by the user.
    • showSelectionView

      void showSelectionView()
      Displays the selection view where users can choose game settings.
    • showPrepareView

      void showPrepareView()
      Displays the preparation view before starting the game.
    • showRunView

      void showRunView()
      Displays the main game view where the game is played.
    • showVictoryView

      void showVictoryView(String winner)
      Displays the victory view when the player wins the game.
      Parameters:
      winner - The winner of the game.
    • showHint

      void showHint()
      Displays a hint to the player during the game.
    • showFailureView

      void showFailureView()
      Displays the failure view when the player loses the game.
    • setGameView

      void setGameView(IGameView gameView)
      Sets the game view, which is responsible for the user interface.
      Parameters:
      gameView - The game view to set.
    • getDifficulty

      String getDifficulty()
      Gets the current difficulty level of the game.
      Returns:
      The current difficulty level.
    • setDifficulty

      void setDifficulty(String difficulty)
      Sets the difficulty level of the game.
      Parameters:
      difficulty - The difficulty level to set (e.g., Easy, Medium, Hard).
    • getGameService

      IGameService getGameService()
      Gets the game service, which handles game logic and operations.
      Returns:
      The game service.
    • startAiMovement

      void startAiMovement()
      Starts the AI movement in the game.