|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--hockey.api.Position
An IObject implementation that represents a position
on the ice. It may also have heading and speed.
IObject| Constructor Summary | |
Position(int x,
int y)
Creates a new Position from a given position, with
zero heading and speed. |
|
Position(int x,
int y,
int heading,
int speed)
Creates a new Position from a given position, heading
and speed. |
|
Position(IObject o)
Creates a new Position from a given
IObject's current position, heading and speed. |
|
| Method Summary | |
int |
getHeading()
Returns the absolute heading in degrees. |
int |
getSpeed()
Returns the speed in cm/s. |
int |
getX()
Returns the x-coordinate in cm. |
int |
getY()
Returns the y-coordinate in cm. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Position(IObject o)
Position from a given
IObject's current position, heading and speed.
o - the IObject that the position, heading and
speed is copied from.
public Position(int x,
int y)
Position from a given position, with
zero heading and speed.
x - the x-coordinate of the position, in cm.y - the y-coordinate of the position, in cm.
public Position(int x,
int y,
int heading,
int speed)
Position from a given position, heading
and speed.
x - the x-coordinate of the position, in cm.y - the y-coordinate of the position, in cm.heading - the Position's heading, in degrees.speed - the Position's speed, in cm/s.| Method Detail |
public int getX()
IObject
getX in interface IObjectpublic int getY()
IObject
getY in interface IObjectpublic int getHeading()
IObject
getHeading in interface IObjectpublic int getSpeed()
IObject
getSpeed in interface IObject
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||