public interface SensorPack
Interface SensorPack
is given to you so that you can
call this to learn about the current status of the soccer field.
Method Summary | |
---|---|
int |
ballHeldByPlayer()
Which player is holding the ball? |
int |
ballHeldByTeam()
Which team is holding the ball? |
void |
drawLine(double x1,
double y1,
double x2,
double y2)
A utility/debugging method: draw a line from (x1,y1) to (x2,y2). |
double |
getAngle(double x1,
double y1,
double x2,
double y2)
A utility method: what is the angle of the line segment going from from (x1,y1) to (x2,y2)? |
double |
getBallTheta()
Get the ball's orientation. |
double |
getBallX()
Get the ball's x location. |
double |
getBallY()
Get the ball's y location. |
double |
getCurrentTime()
Get the current time. |
double |
getTheta(int team,
int player)
Get the orientation of any player, in whichever team. |
double |
getX(int team,
int player)
Get the x-coordinate of any player's location, in whichever team. |
double |
getY(int team,
int player)
Get the y-coordinate of any player's location, in whichever team. |
boolean |
isBallHeld()
Has the ball been grabbed and is being held by someone? |
Method Detail |
---|
double getX(int team, int player)
double getY(int team, int player)
double getTheta(int team, int player)
double getBallX()
double getBallY()
double getBallTheta()
double getCurrentTime()
boolean isBallHeld()
int ballHeldByTeam()
int ballHeldByPlayer()
double getAngle(double x1, double y1, double x2, double y2)
void drawLine(double x1, double y1, double x2, double y2)