|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectObstacle
Field Summary | |
(package private) static java.util.Random |
rand
|
(package private) int |
xPosition
|
(package private) int |
yPosition
|
Constructor Summary | |
Obstacle()
Default constructor. |
|
Obstacle(int x,
int y)
Creates and obstacle with the specified location. |
Method Summary | |
void |
draw(java.awt.Graphics g)
Default rendering method. |
int |
getXPosition()
Accessor method for the xPosition. |
int |
getYPosition()
Accessor method for the yPosition. |
void |
setX(int x)
Mutator method for the x positon. |
void |
setY(int y)
Mutator method for the y positon. |
java.lang.String |
toString()
Constructs a string representation of the the obstacle. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
int xPosition
int yPosition
static java.util.Random rand
Constructor Detail |
public Obstacle()
public Obstacle(int x, int y)
x
- horizontal position of the obstacley
- vertical position of the obstacleMethod Detail |
public int getXPosition()
public int getYPosition()
public void setX(int x)
x
- new x positionpublic void setY(int y)
y
- new y positionpublic void draw(java.awt.Graphics g)
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |