|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.adom.jade.world.maps.Position
Stores the coordinates of a two dimensional map.
| Field Summary | |
|---|---|
int |
x
the x coordinate of the position |
int |
y
the y coordinate of the position |
| Constructor Summary | |
|---|---|
Position(int xp,
int yp)
Creates a new position. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Checks two positions for equality. |
int |
hashCode()
Returns the hashcode for this position. |
void |
moveTowards(Map map,
int fromX,
int fromY,
int toX,
int toY)
Moves this position one step towards a given target position. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int x
public int y
| Constructor Detail |
|---|
public Position(int xp,
int yp)
xp - the x coordinate of the positionyp - the y coordinate of the position| Method Detail |
|---|
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectobject - the object to check for equality
public int hashCode()
hashCode in class java.lang.Object
public void moveTowards(Map map,
int fromX,
int fromY,
int toX,
int toY)
fromX - the x coordinate of the start positionfromY - the y coordinate of the start positiontoX - the x coordinate of the target positiontoY - the y coordinate of the target position
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||