Package com.prineside.tdi2.pathfinding
Class MoveSide
java.lang.Object
com.prineside.tdi2.pathfinding.MoveSide
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte[]
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final int
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
areConnected
(byte from, byte to) static void
assertValid
(byte v) static byte
calculateMoveSides
(PathNode curr, PathNode prev, PathNode next) static String
getName
(byte moveSide) static IntPair
getNextNodeShift
(byte moveSide) static boolean
isStraightLine
(byte moveSide) static byte
-
Field Details
-
LEFT_TOP
public static final byte LEFT_TOP- See Also:
-
LEFT_RIGHT
public static final byte LEFT_RIGHT- See Also:
-
LEFT_BOTTOM
public static final byte LEFT_BOTTOM- See Also:
-
LEFT_CENTER
public static final byte LEFT_CENTER- See Also:
-
TOP_LEFT
public static final byte TOP_LEFT- See Also:
-
TOP_RIGHT
public static final byte TOP_RIGHT- See Also:
-
TOP_BOTTOM
public static final byte TOP_BOTTOM- See Also:
-
TOP_CENTER
public static final byte TOP_CENTER- See Also:
-
RIGHT_LEFT
public static final byte RIGHT_LEFT- See Also:
-
RIGHT_TOP
public static final byte RIGHT_TOP- See Also:
-
RIGHT_BOTTOM
public static final byte RIGHT_BOTTOM- See Also:
-
RIGHT_CENTER
public static final byte RIGHT_CENTER- See Also:
-
BOTTOM_LEFT
public static final byte BOTTOM_LEFT- See Also:
-
BOTTOM_TOP
public static final byte BOTTOM_TOP- See Also:
-
BOTTOM_RIGHT
public static final byte BOTTOM_RIGHT- See Also:
-
BOTTOM_CENTER
public static final byte BOTTOM_CENTER- See Also:
-
CENTER_LEFT
public static final byte CENTER_LEFT- See Also:
-
CENTER_TOP
public static final byte CENTER_TOP- See Also:
-
CENTER_RIGHT
public static final byte CENTER_RIGHT- See Also:
-
CENTER_BOTTOM
public static final byte CENTER_BOTTOM- See Also:
-
VALUES_COUNT
public static final int VALUES_COUNT- See Also:
-
REVERSE
public static final byte[] REVERSE
-
-
Method Details
-
areConnected
public static boolean areConnected(byte from, byte to) -
getNextNodeShift
- Returns:
- null, если ведет в центр (т.е. не ведет к следующему тайлу). a = x, b = y
-
isStraightLine
public static boolean isStraightLine(byte moveSide) -
getName
-
valueOf
-
calculateMoveSides
- Returns:
- move side
-
assertValid
public static void assertValid(byte v)
-