Class GameSelectionController
java.lang.Object
edu.ntnu.idi.idatt.controller.common.GameSelectionController
- All Implemented Interfaces:
ButtonClickObserver
GameSelectionController
This class is responsible for controlling the game selection view. It implements
ButtonClickObserver
.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for the GameSelectionController. -
Method Summary
Modifier and TypeMethodDescriptionvoid
onButtonClicked
(String buttonId) Handles the button click event.void
onButtonClickedWithParams
(String buttonId, Map<String, Object> params) Handles the button click event with parameters.void
setOnLadderGame
(Runnable onLadderGame) Sets the callback to run when the ladder game is selected.void
setOnLudoGame
(Runnable onLudoGame) Sets the callback to run when the ludo game is selected.
-
Constructor Details
-
GameSelectionController
Constructor for the GameSelectionController.- Parameters:
view
- The view to control.
-
-
Method Details
-
setOnLadderGame
Sets the callback to run when the ladder game is selected.- Parameters:
onLadderGame
- The ladder game callback.
-
setOnLudoGame
Sets the callback to run when the ludo game is selected.- Parameters:
onLudoGame
- The ludo game callback.
-
onButtonClicked
Handles the button click event.- Specified by:
onButtonClicked
in interfaceButtonClickObserver
- Parameters:
buttonId
- The button ID.
-
onButtonClickedWithParams
Handles the button click event with parameters.- Specified by:
onButtonClickedWithParams
in interfaceButtonClickObserver
- Parameters:
buttonId
- The button ID.params
- The parameters.
-