org.eviline
Enum KickTable

java.lang.Object
  extended by java.lang.Enum<KickTable>
      extended by 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

Enum Constant Summary
DOWN_LEFT
           
DOWN_RIGHT
           
IDOWN_LEFT
           
IDOWN_RIGHT
           
ILEFT_DOWN
           
ILEFT_UP
           
IRIGHT_DOWN
           
IRIGHT_UP
           
IUP_LEFT
           
IUP_RIGHT
           
LEFT_DOWN
           
LEFT_UP
           
NO_KICK
           
RIGHT_DOWN
           
RIGHT_UP
           
UP_LEFT
           
UP_RIGHT
           
 
Method Summary
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
 int[][] table()
           
static KickTable valueOf(String name)
          Returns the enum constant of this type with the specified name.
static KickTable[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

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
Method Detail

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.