Enum Class GameControls.GameState

java.lang.Object
java.lang.Enum<GameControls.GameState>
edu.uw.tcss.model.GameControls.GameState
All Implemented Interfaces:
Serializable, Comparable<GameControls.GameState>, Constable
Enclosing interface:
GameControls

public static enum GameControls.GameState extends Enum<GameControls.GameState>
Specifies a game state for Tetris. The implementing class of the GameControls interface will always be in one of these defined states.
Version:
Winter 2025
Author:
Charles Bryan
  • Enum Constant Details

    • NEW

      public static final GameControls.GameState NEW
      A new Tetris game has started. The game is not yet RUNNING. It may not become PAUSED or OVER. The next state is RUNNING.
    • RUNNING

      public static final GameControls.GameState RUNNING
      A Tetris game is RUNNING. The game is not PAUSED or over but may become PAUSED or OVER.
    • PAUSED

      public static final GameControls.GameState PAUSED
      A tetris game is PAUSED. The game is not OVER.
    • OVER

      public static final GameControls.GameState OVER
      A Tetris game is OVER. It may not be PAUSED. It may not become RUNNING without requesting a new game.
  • Method Details

    • values

      public static GameControls.GameState[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static GameControls.GameState valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null