Interface ButtonClickSubject

All Known Implementing Classes:
BoardCreatorView, GameFinishedView, GameSelectionView, GameView, LadderGameBoardCreatorView, LadderGameMenuView, LadderGameView, LudoBoardCreatorView, LudoGameMenuView, LudoGameView, MenuView

public interface ButtonClickSubject
ButtonClickSubject interface

This interface defines the methods for classes that need to notify observers of button click events.

  • Method Details

    • addObserver

      void addObserver(ButtonClickObserver observer)
      Adds an observer to the subject.
      Parameters:
      observer - the observer to add
    • removeObserver

      void removeObserver(ButtonClickObserver observer)
      Removes an observer from the subject.
      Parameters:
      observer - the observer to remove
    • notifyObservers

      void notifyObservers(String buttonId)
      Notifies all observers.
      Parameters:
      buttonId - the ID of the button clicked
    • notifyObserversWithParams

      void notifyObserversWithParams(String buttonId, Map<String,Object> params)
      Notifies all observers, with a map of parameters.
      Parameters:
      buttonId - the ID of the button clicked
      params - the parameters of the button click event