Class LadderGameMenuController

java.lang.Object
edu.ntnu.idi.idatt.controller.common.MenuController
edu.ntnu.idi.idatt.controller.laddergame.LadderGameMenuController
All Implemented Interfaces:
ButtonClickObserver

public class LadderGameMenuController extends MenuController
LadderGameMenuController.

This class extends MenuController to manage the specific setup and logic for the Ladder Game main menu. It is responsible for initializing the menu view with Ladder Game specific options, such as available board variants, player token types, and player limits.

Key responsibilities include:

  • Setting up the LadderBoardFactory to create ladder game boards.
  • Defining constraints for the Ladder Game, such as minimum/maximum players and allowed player token types (though currently, all token types and colors are permitted without restriction).
  • Populating the list of players by creating LadderGamePlayer instances from the information entered in the menu view's player rows.
  • Initializing the MenuView with Ladder Game specific title, token types, colors, and player limits.
  • Loading predefined/hardcoded ladder board variants (e.g., "Classic", "Teleporting") using the board factory.
See Also: