| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.aranai.dungeonator.Direction
public final class Direction
Specifies byte values for the 12 cardinal directions, starting at 0 for North and proceeding clockwise. Also includes convenience arrays and functions for determining side from direction, directions from side, and computing rotations.
| Field Summary | |
|---|---|
| static byte[] | CARDINALSCardinal Directions | 
| static byte | CLOCKWISEClockwise Direction Sequence | 
| static byte | COUNTER_CLOCKWISECounter-Clockwise Direction Sequence | 
| static byte | EEast | 
| static byte | ENEEast by Northeast | 
| static byte | ESEEast by Southeast | 
| static byte | NNorth | 
| static byte | NNENorth by Northeast | 
| static byte | NNWNorth by Northwest | 
| static byte | SSouth | 
| static byte[] | SIDE_EASTEast Side Directions | 
| static byte[] | SIDE_NORTHNorth Side Directions | 
| static byte[] | SIDE_SOUTHSouth Side Directions | 
| static byte[] | SIDE_WESTWest Side Directions | 
| static byte | SSESouth by Southeast | 
| static byte | SSWSouth by Southwest | 
| static byte | WWest | 
| static byte | WNWWest by Northwest | 
| static byte | WSWWest by Southwest | 
| Constructor Summary | |
|---|---|
| Direction() | |
| Method Summary | |
|---|---|
| static byte[] | getSideFromDirection(byte direction)Gets the side to which the specified direction belongs. | 
| static byte | rotate(byte start,
       byte direction,
       int advance)Return a direction rotated a specified number of steps, either clockwise or counterclockwise, from a specified starting direction. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static byte N
public static byte E
public static byte S
public static byte W
public static byte NNE
public static byte ENE
public static byte ESE
public static byte SSE
public static byte SSW
public static byte WSW
public static byte WNW
public static byte NNW
public static byte[] SIDE_NORTH
public static byte[] SIDE_EAST
public static byte[] SIDE_SOUTH
public static byte[] SIDE_WEST
public static byte[] CARDINALS
public static byte CLOCKWISE
public static byte COUNTER_CLOCKWISE
| Constructor Detail | 
|---|
public Direction()
| Method Detail | 
|---|
public static byte[] getSideFromDirection(byte direction)
direction - the direction
public static byte rotate(byte start,
                          byte direction,
                          int advance)
start - the starting directiondirection - the direction to rotateadvance - the number of steps to advance
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||