Package sac.model

Enum Class Model.MoveType

All Implemented Interfaces:
Serializable, Comparable<Model.MoveType>, Constable
Enclosing class:
Model

public static enum Model.MoveType extends Enum<Model.MoveType>
The type of movement.
  • Enum Constant Details

    • ROTATE_LEFT

      public static final Model.MoveType ROTATE_LEFT
      Rotate the current piece 90 degrees counterclockwise.
    • ROTATE_RIGHT

      public static final Model.MoveType ROTATE_RIGHT
      Rotate the current piece 90 degrees clockwise.
    • LEFT

      public static final Model.MoveType LEFT
      Move the piece left by one unit.
    • DOWN

      public static final Model.MoveType DOWN
      Move the piece down by one unit.
    • HARD_DROP

      public static final Model.MoveType HARD_DROP
      Drop the current piece.
    • HOLD

      public static final Model.MoveType HOLD
      Hold the current piece and replace it with a new one.
  • Method Details

    • values

      public static Model.MoveType[] 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 Model.MoveType 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