|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.adom.jade.utils.Direction
Encapsulates constants for the various (eight) directions of the game.
| Field Summary | |
|---|---|
static int |
E
east |
static int |
MAX_DIRECTION
the number of real directions |
static int |
N
north |
static int |
NE
northeast |
static int |
NO_DIRECTION
no direction |
static int |
NW
northwest |
static int |
S
south |
static int |
SE
southeast |
static int |
SELF
self |
static int |
SW
southwest |
static int |
W
west |
| Constructor Summary | |
|---|---|
Direction()
|
|
| Method Summary | |
|---|---|
static int |
getModifiedX(int x,
int direction)
Returns an x coordinate modified by a specific direction. |
static int |
getModifiedY(int y,
int direction)
Returns a y coordinate modified by a specific direction. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int N
public static final int NW
public static final int W
public static final int SW
public static final int S
public static final int SE
public static final int E
public static final int NE
public static final int MAX_DIRECTION
public static final int SELF
public static final int NO_DIRECTION
| Constructor Detail |
|---|
public Direction()
| Method Detail |
|---|
public static final int getModifiedX(int x,
int direction)
x - the x coordinatedirection - the direction
public static final int getModifiedY(int y,
int direction)
y - the y coordinatedirection - the direction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||