Class DeckSelectOption

java.lang.Object
javatro.manager.options.DeckSelectOption
All Implemented Interfaces:
Option

public class DeckSelectOption extends Object implements Option
Represents a menu option for selecting a specific deck type to start a new game. When executed, initializes the game with the specified deck and transitions to the blind screen.
  • Constructor Details

    • DeckSelectOption

      public DeckSelectOption(String description, Deck.DeckType deckType)
      Constructs a deck selection option with specified description and deck type.
      Parameters:
      description - User-visible description of the option
      deckType - The type of deck to initialize when selected
      Throws:
      NullPointerException - if description or deckType are null
  • Method Details

    • getDescription

      public String getDescription()
      Retrieves a description of the command. This method has a default implementation returning an empty string.
      Specified by:
      getDescription in interface Option
      Returns:
      The description text for this deck selection option
    • execute

      public void execute() throws JavatroException
      Executes the command. Implementing classes must define specific behavior. Initializes game with selected deck type and transitions to blind screen.
      Specified by:
      execute in interface Option
      Throws:
      JavatroException - if game initialization fails