Package sac.model
Enum Class Model.MoveType
- All Implemented Interfaces:
Serializable
,Comparable<Model.MoveType>
,Constable
- Enclosing class:
Model
The type of movement.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionMove the piece down by one unit.Drop the current piece.Hold the current piece and replace it with a new one.Move the piece left by one unit.Move the piece right by one unit.Rotate the current piece 90 degrees counterclockwise.Rotate the current piece 90 degrees clockwise. -
Method Summary
Modifier and TypeMethodDescriptionstatic Model.MoveType
Returns the enum constant of this class with the specified name.static Model.MoveType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ROTATE_LEFT
Rotate the current piece 90 degrees counterclockwise. -
ROTATE_RIGHT
Rotate the current piece 90 degrees clockwise. -
LEFT
Move the piece left by one unit. -
RIGHT
Move the piece right by one unit. -
DOWN
Move the piece down by one unit. -
HARD_DROP
Drop the current piece. -
HOLD
Hold the current piece and replace it with a new one.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-