|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object us.asciiroth.client.core.Direction
public class Direction
A direction on the map, also representing the information to interact with adjacent terrain on the map or adjacent maps.
Field Summary | |
---|---|
static Direction |
DOWN
Down. |
static Direction |
EAST
East. |
static Direction |
NONE
No direction indicated. |
static Direction |
NORTH
North. |
static Direction |
NORTHEAST
Northeast. |
static Direction |
NORTHWEST
Northwest. |
static Direction |
SOUTH
South. |
static Direction |
SOUTHEAST
Southeast. |
static Direction |
SOUTHWEST
Southwest. |
static Direction |
UP
Up. |
static Direction |
WEST
West. |
Method Summary | |
---|---|
static Direction |
byName(java.lang.String name)
Retrieve a direction by its name. |
static java.util.List<Direction> |
getAdjacentDirections()
A list of directions that lead to the adjacent cells on a map, not including up or down. |
static java.util.List<Direction> |
getMapDirections()
A list of directions that lead to adjacent boards, the cardinal directions as well as up and down. |
java.lang.String |
getName()
|
Direction |
getReverseDirection()
|
int |
getXDelta()
|
int |
getYDelta()
|
static Direction |
inferDirection(Cell origin,
Cell target)
Given movement from a start cell to an origin cell, what's the direction that has to be taken? |
boolean |
isDiagonal()
A diagonal direction: northeast, northwest, southeast or southwest. |
boolean |
isEasterly()
A direction that includes an easterly component. |
boolean |
isEastWest()
A direction that leads east or west. |
boolean |
isNortherly()
A direction that includes a northerly component. |
boolean |
isNorthSouth()
A direction that leads north or south. |
boolean |
isSoutherly()
A direction that includes a southerly component. |
boolean |
isVertical()
A direction that leads up or down. |
boolean |
isWesterly()
A direction that includes a westerly component. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Direction DOWN
public static final Direction EAST
public static final Direction NONE
public static final Direction NORTH
public static final Direction NORTHEAST
public static final Direction NORTHWEST
public static final Direction SOUTH
public static final Direction SOUTHEAST
public static final Direction SOUTHWEST
public static final Direction UP
public static final Direction WEST
Method Detail |
---|
public static Direction byName(java.lang.String name)
name
- the name of the direction, in lowercase
public static java.util.List<Direction> getAdjacentDirections()
public static java.util.List<Direction> getMapDirections()
public java.lang.String getName()
public Direction getReverseDirection()
public int getXDelta()
public int getYDelta()
public static Direction inferDirection(Cell origin, Cell target)
origin
- target
-
public boolean isDiagonal()
public boolean isEasterly()
public boolean isEastWest()
public boolean isNortherly()
public boolean isNorthSouth()
public boolean isSoutherly()
public boolean isVertical()
public boolean isWesterly()
public java.lang.String toString()
toString
in class java.lang.Object
|
0.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
© 2009 Alx Dark