org.eviline
Enum KickTable
java.lang.Object
java.lang.Enum<KickTable>
org.eviline.KickTable
- All Implemented Interfaces:
- Serializable, Comparable<KickTable>
public enum KickTable
- extends Enum<KickTable>
Table of kicks for shape rotations using SRS
- Author:
- robin
NO_KICK
public static final KickTable NO_KICK
UP_RIGHT
public static final KickTable UP_RIGHT
RIGHT_UP
public static final KickTable RIGHT_UP
RIGHT_DOWN
public static final KickTable RIGHT_DOWN
DOWN_RIGHT
public static final KickTable DOWN_RIGHT
DOWN_LEFT
public static final KickTable DOWN_LEFT
LEFT_DOWN
public static final KickTable LEFT_DOWN
LEFT_UP
public static final KickTable LEFT_UP
UP_LEFT
public static final KickTable UP_LEFT
IUP_RIGHT
public static final KickTable IUP_RIGHT
IRIGHT_UP
public static final KickTable IRIGHT_UP
IRIGHT_DOWN
public static final KickTable IRIGHT_DOWN
IDOWN_RIGHT
public static final KickTable IDOWN_RIGHT
IDOWN_LEFT
public static final KickTable IDOWN_LEFT
ILEFT_DOWN
public static final KickTable ILEFT_DOWN
ILEFT_UP
public static final KickTable ILEFT_UP
IUP_LEFT
public static final KickTable IUP_LEFT
values
public static KickTable[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (KickTable c : KickTable.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static KickTable valueOf(String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (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 type has no constant
with the specified name
NullPointerException
- if the argument is null
table
public int[][] table()
forShape
public static KickTable forShape(ShapeType type,
ShapeDirection start,
ShapeDirection end)
- Return the kick table for a shape type being rotated from the specified start to end directions
- Parameters:
type
- start
- end
-
- Returns:
Copyright © 2013. All Rights Reserved.