|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ISimulatorTeam
The interface of a simulator as seen by a Team. Note that deviations from the pre-conditions/parameter constraints specified for each method will result in a protocol error and therefore ending of the game.
| Method Summary | |
|---|---|
Reply |
accelerate(int t,
int p,
double a)
Send accelerate control request. |
boolean |
connect(java.lang.String host,
Student sim,
Student team)
Connect to host using Soccer2006 protocol. |
Reply |
end()
Instruct simulator to abort the game. |
Reply |
getGameData()
Send all feedback request. |
Reply |
initGame(Side prefSide)
Protocol sequence to initialize game. |
Reply |
kick(int t,
int p,
double v,
double alpha)
Send kick control request. |
Reply |
place_ball(int t,
CartesianVect l)
Send place_ball control request. |
Reply |
place_player(int t,
int p,
CartesianVect l)
Send place_player control request. |
Reply |
quit()
Instruct the simulator to disconnect and shut down. |
Reply |
set_time(int t,
int newT)
Send set_time control request. |
Reply |
spin(int t,
int p,
double av)
Send spin control request. |
| Method Detail |
|---|
boolean connect(java.lang.String host,
Student sim,
Student team)
host - hostname or ipaddress for simulatorsim - which simulator model will host the gameteam - which team am I
Reply initGame(Side prefSide)
throws ParseException,
java.io.IOException
prefSide - the preferred side for this team.
ParseException - incorrectly formatted message.
java.io.IOException - connection/network error
Reply getGameData()
throws java.io.IOException,
ParseException
java.io.IOException - connection/network error
ParseException - incorrectly formatted message.
Reply spin(int t,
int p,
double av)
throws java.io.IOException,
ParseException
t - Time at which this command is to be executed. 0 <= tp - Player number. In {0, 1, 2, 3, 4}av - Angular velocity in degrees per second. -90 <= av <= 90
java.io.IOException - connection/network error
ParseException - incorrectly formatted message.
Reply accelerate(int t,
int p,
double a)
throws java.io.IOException,
ParseException
t - Time at which this command is to be executed. 0 <= tp - Player number. In {0, 1, 2, 3, 4}a - rate of acceleration. -5 <= a <= 1
java.io.IOException - connection/network error
ParseException - incorrectly formatted message.
Reply kick(int t,
int p,
double v,
double alpha)
throws java.io.IOException,
ParseException
t - Time at which this command is to be executed. 0 <= tp - Player number. In {0, 1, 2, 3, 4}v - Change in the ball's velocity. 0 <= v <= 10alpha - Offset in degrees from a line connecting the player's
centre to the ball's centre. -45 <= alpha <= 45
java.io.IOException - connection/network error
ParseException - incorrectly formatted message.
Reply end()
throws java.io.IOException,
ParseException
java.io.IOException - connection/network error
ParseException - incorrectly formatted message.
Reply quit()
throws java.io.IOException,
ParseException
java.io.IOException - connection/network error
ParseException - incorrectly formatted message.
Reply place_player(int t,
int p,
CartesianVect l)
throws java.io.IOException,
ParseException
Precondition: Simulator is in Test mode.
t - Time at which this command is to be executed. 0 <= tp - Player number. In {0, 1, 2, 3, 4}l - New position for player
java.io.IOException - connection/network error
ParseException - incorrectly formatted message.
Reply place_ball(int t,
CartesianVect l)
throws java.io.IOException,
ParseException
Precondition: Simulator is in Test mode.
t - Time at which this command is to be executed. 0 <= tl - New position for ball
java.io.IOException - connection/network error
ParseException - incorrectly formatted message.
Reply set_time(int t,
int newT)
throws java.io.IOException,
ParseException
Precondition: Simulator is in Test mode.
t - Time at which this command is to be executed. 0 <= tnewT - New time
java.io.IOException - connection/network error
ParseException - incorrectly formatted message.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||