Class MenuModel

java.lang.Object
model.gameStates.MenuModel

public class MenuModel extends Object
The MenuModel class represents the model for the menu state in the game. It manages the different overlays and their states.
  • Constructor Details

    • MenuModel

      public MenuModel()
      Constructs a MenuModel and initializes the overlay models.
  • Method Details

    • update

      public void update()
      Updates the active overlay model.
    • setUserSelectionOverlayActive

      public void setUserSelectionOverlayActive(boolean userSelectionOverlayActive)
      Sets the user selection overlay active state.
      Parameters:
      userSelectionOverlayActive - the new state of the user selection overlay
    • setUserCreationOverlayActive

      public void setUserCreationOverlayActive(boolean userCreationOverlayActive)
      Sets the user creation overlay active state.
      Parameters:
      userCreationOverlayActive - the new state of the user creation overlay
    • setScoreBoardOverlayActive

      public void setScoreBoardOverlayActive(boolean scoreBoardOverlayActive)
      Sets the score board overlay active state.
      Parameters:
      scoreBoardOverlayActive - the new state of the score board overlay
    • isUserSelectionOverlayActive

      public boolean isUserSelectionOverlayActive()
      Checks if the user selection overlay is active.
      Returns:
      true if the user selection overlay is active, false otherwise
    • isUserCreationOverlayActive

      public boolean isUserCreationOverlayActive()
      Checks if the user creation overlay is active.
      Returns:
      true if the user creation overlay is active, false otherwise
    • isScoreBoardOverlayActive

      public boolean isScoreBoardOverlayActive()
      Checks if the score board overlay is active.
      Returns:
      true if the score board overlay is active, false otherwise
    • getSelectionIndex

      public int getSelectionIndex()
      Returns the current selection index.
      Returns:
      the current selection index
    • setSelectionIndex

      public void setSelectionIndex(int selectionIndex)
      Sets the selection index.
      Parameters:
      selectionIndex - the new selection index
    • increaseSelectionIndex

      public void increaseSelectionIndex()
      Increases the selection index by one.
    • decreaseSelectionIndex

      public void decreaseSelectionIndex()
      Decreases the selection index by one.
    • getMenuUserCreationOverlayModel

      public MenuUserCreationOverlayModel getMenuUserCreationOverlayModel()
      Returns the MenuUserCreationOverlayModel instance.
      Returns:
      the MenuUserCreationOverlayModel instance
    • getMenuUserSelectionOverlayModel

      public MenuUserSelectionOverlayModel getMenuUserSelectionOverlayModel()
      Returns the MenuUserSelectionOverlayModel instance.
      Returns:
      the MenuUserSelectionOverlayModel instance
    • getMenuScoreBoardOverlayModel

      public MenuScoreBoardOverlayModel getMenuScoreBoardOverlayModel()
      Returns the MenuScoreBoardOverlayModel instance.
      Returns:
      the MenuScoreBoardOverlayModel instance