|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gecco.client.Position
Represents the position of a Piece. The coordinates are given as doubles.
Field Summary | |
double |
x
Description of the Field |
double |
y
Description of the Field |
Constructor Summary | |
Position()
Initilizes a position at the origin (0,0); |
|
Position(double x,
double y)
Constructor for the Position object |
|
Position(Position p)
Initilizes a position with the same coordinates as the given position object. |
Method Summary | |
boolean |
equals(Position p)
Description of the Method |
double |
getX()
Gets the X attribute of the Position object |
double |
getY()
Gets the Y attribute of the Position object |
void |
setX(double x)
Sets the X attribute of the Position object |
void |
setY(double y)
Sets the Y attribute of the Position object |
void |
translate(double dx,
double dy)
Description of the Method |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public double x
public double y
Constructor Detail |
public Position()
public Position(Position p)
p
- Description of Parameterpublic Position(double x, double y)
x
- Description of Parametery
- Description of ParameterMethod Detail |
public void setX(double x)
x
- The new X valuepublic void setY(double y)
y
- The new Y valuepublic double getX()
public double getY()
public void translate(double dx, double dy)
dx
- Description of Parameterdy
- Description of Parameterpublic boolean equals(Position p)
p
- Description of Parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |