Class StartGameOption

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

public class StartGameOption extends Object implements Option
The StartGameOption class represents a command that initializes and starts a new game session by setting the game screen.
  • Constructor Details

    • StartGameOption

      public StartGameOption()
  • Method Details

    • getDescription

      public String getDescription()
      Provides a brief description of the command.
      Specified by:
      getDescription in interface Option
      Returns:
      A string describing the command.
    • setDescription

      public void setDescription(String description)
      Updates the description of the command.
      Specified by:
      setDescription in interface Option
      Parameters:
      description - The new description to set.
    • execute

      public void execute() throws JavatroException
      Executes the command to begin the game, restore available commands, and update the main screen to display the game interface.
      Specified by:
      execute in interface Option
      Throws:
      JavatroException - If an error occurs while starting the game.