|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmaze.geometry.Coordinate
Bean which defines a location in the Maze using a two-dimensional coordinate space. For rectangular grids, this is self-evident. But for hexagonal grids, there is a transformation from hex coordinates to rectangular graphic coordinates. The MazeGeometry does this interpretation. The MazeGeometry also handles transformations to graphic Point coordinates.
MazeGeometry| Field Summary | |
int |
x
Horizontal dimension value. |
int |
y
Vertical dimension value. |
| Constructor Summary | |
Coordinate(int x,
int y)
Constructs a new Coordinate from the given horizontal and vertical values. |
|
| Method Summary | |
int |
getX()
Returns the horizontal coordinate. |
int |
getY()
Returns the vertical coordinate. |
void |
setX(int x)
Sets the horizontal coordinate. |
void |
setY(int y)
Sets the vertical cooedinate. |
java.lang.String |
toString()
Returns a string representation of this coordinate. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public int x
public int y
| Constructor Detail |
public Coordinate(int x,
int y)
x - int horizontal dimension value.y - int vertical dimension value.| Method Detail |
public java.lang.String toString()
public void setX(int x)
x - int horizontal coordinate.public void setY(int y)
y - int vertical coordinate.public int getX()
public int getY()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||