public enum Gate extends Enum<Gate>
Gate
is an enumeration type that defines the connection points on tiles.
The exact position of the gates is shown in the following picture from the interface document v1.0
The Gate
is implemented as it is defined in the that version.
Enum Constant and Description |
---|
EAST_LOWER |
EAST_UPPER |
NORTH_LEFT |
NORTH_RIGHT |
SOUTH_LEFT |
SOUTH_RIGHT |
WEST_LOWER |
WEST_UPPER |
Modifier and Type | Method and Description |
---|---|
static Gate |
getGateByValue(int value) |
static Gate |
getOpposite(Gate gate)
This calculates the Gate at the opposite side of the tile
|
int |
getValue() |
static Gate |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Gate[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Gate NORTH_LEFT
public static final Gate NORTH_RIGHT
public static final Gate SOUTH_LEFT
public static final Gate SOUTH_RIGHT
public static final Gate EAST_UPPER
public static final Gate EAST_LOWER
public static final Gate WEST_UPPER
public static final Gate WEST_LOWER
public static Gate[] values()
for (Gate c : Gate.values()) System.out.println(c);
public static Gate 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 int getValue()
public static Gate getGateByValue(int value)
Copyright © 2017 smarTen. All rights reserved.