|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Instances of this interface allow movement along the 8 cardinal directions.
Field Summary | |
static int |
EAST
East direction. |
static int |
NORTH
North direction. |
static int |
NORTHEAST
Northeast direction. |
static int |
NORTHWEST
Northwest direction. |
static int |
SOUTH
South direction. |
static int |
SOUTHEAST
Southeast direction. |
static int |
SOUTHWEST
Southwest direction. |
static int |
WEST
West direction. |
Method Summary | |
Moveable |
move(int direction,
int distance)
Creates a new copy of this movable item, shifted in the given direction by the given number of pixels. |
Moveable |
shift(int x,
int y)
Shifts the moveable by the given amount. |
Field Detail |
public static final int NORTH
move(int, int)
,
Constant Field Valuespublic static final int NORTHEAST
move(int, int)
,
Constant Field Valuespublic static final int EAST
move(int, int)
,
Constant Field Valuespublic static final int SOUTHEAST
move(int, int)
,
Constant Field Valuespublic static final int SOUTH
move(int, int)
,
Constant Field Valuespublic static final int SOUTHWEST
move(int, int)
,
Constant Field Valuespublic static final int WEST
move(int, int)
,
Constant Field Valuespublic static final int NORTHWEST
move(int, int)
,
Constant Field ValuesMethod Detail |
public Moveable move(int direction, int distance)
direction
- the direction to move the itemdistance
- the distance to move it
public Moveable shift(int x, int y)
x
- y
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |