|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--wworld.GridPoint
Class specifying object representing each GridPoint in the world.
Constructor Summary | |
GridPoint()
|
|
GridPoint(int newx,
int newy)
|
Method Summary | |
void |
advanceDown()
Sets the attributes of this gridpoint to point to the location below it. |
void |
advanceLeft()
Sets the attributes of this gridpoint to point to the location to its left. |
void |
advanceRight()
Sets the attributes of this gridpoint to point to the location to its right. |
void |
advanceUp()
Sets the attributes of this gridpoint to point to the location to the location above it. |
java.lang.Object |
clone()
Returns an Object that is a copy of this grid point object. |
int |
getPtX()
Returns the horizontal position of the location represented by this GridPoint. |
int |
getPtY()
Returns the vertical position of the location represented by this GridPoint. |
void |
setGridPoint(GridPoint p)
Sets the attributes of this GridPoint to be the same as those of the GridPoint passed to it. |
void |
setGridPoint(int newx,
int newy)
Sets the attributes to the indicated new values. |
void |
setPtX(int newx)
Used to set the x position of this Object. |
void |
setPtY(int newy)
Used to set the y position of this object. |
java.lang.String |
toString()
Represents this object as a String of the form (x, y). |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GridPoint()
public GridPoint(int newx, int newy)
Method Detail |
public java.lang.Object clone()
clone
in class java.lang.Object
public void setPtX(int newx)
public void setPtY(int newy)
public void setGridPoint(int newx, int newy)
public void setGridPoint(GridPoint p)
public int getPtX()
public int getPtY()
public void advanceLeft()
public void advanceRight()
public void advanceUp()
public void advanceDown()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |