public enum Shape extends Enum<Shape>
Enum Constant and Description |
---|
I_DOWN |
I_LEFT |
I_RIGHT |
I_UP |
J_DOWN |
J_LEFT |
J_RIGHT |
J_UP |
L_DOWN |
L_LEFT |
L_RIGHT |
L_UP |
O_DOWN |
O_LEFT |
O_RIGHT |
O_UP |
S_DOWN |
S_LEFT |
S_RIGHT |
S_UP |
T_DOWN |
T_LEFT |
T_RIGHT |
T_UP |
Z_DOWN |
Z_LEFT |
Z_RIGHT |
Z_UP |
Modifier and Type | Method and Description |
---|---|
ShapeDirection |
direction() |
static Shape |
fromOrdinal(int ordinal) |
boolean |
has(int x,
int y) |
KickTable |
leftKick() |
long |
mask() |
long |
mask(int x) |
int |
overY() |
KickTable |
rightKick() |
Shape |
rotatedLeft() |
Shape |
rotatedRight() |
static long |
shapeMask(int ord) |
static long |
shapeMask(int ord,
int x) |
ShapeType |
type() |
static Shape |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Shape[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Shape S_UP
public static final Shape S_RIGHT
public static final Shape S_DOWN
public static final Shape S_LEFT
public static final Shape Z_UP
public static final Shape Z_RIGHT
public static final Shape Z_DOWN
public static final Shape Z_LEFT
public static final Shape J_UP
public static final Shape J_RIGHT
public static final Shape J_DOWN
public static final Shape J_LEFT
public static final Shape L_UP
public static final Shape L_RIGHT
public static final Shape L_DOWN
public static final Shape L_LEFT
public static final Shape T_UP
public static final Shape T_RIGHT
public static final Shape T_DOWN
public static final Shape T_LEFT
public static final Shape I_UP
public static final Shape I_RIGHT
public static final Shape I_DOWN
public static final Shape I_LEFT
public static final Shape O_UP
public static final Shape O_RIGHT
public static final Shape O_DOWN
public static final Shape O_LEFT
public static Shape[] values()
for (Shape c : Shape.values()) System.out.println(c);
public static Shape valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static Shape fromOrdinal(int ordinal)
public ShapeType type()
public long mask()
public static long shapeMask(int ord, int x)
public static long shapeMask(int ord)
public ShapeDirection direction()
public boolean has(int x, int y)
public long mask(int x)
public int overY()
public Shape rotatedRight()
public Shape rotatedLeft()
public KickTable leftKick()
public KickTable rightKick()
Copyright © 2015. All rights reserved.