|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--IAS
IAS class Main class used to run the IAS (In the Agent's Shoes) interface.
| Field Summary | |
java.util.Vector |
commands
|
Command |
currentCommand
|
SensorInput |
m_brain
|
boolean |
m_goalie
|
java.net.InetAddress |
m_host
|
int |
m_port
|
java.net.DatagramSocket |
m_socket
|
java.lang.String |
m_team
|
static int |
MSG_SIZE
|
PlayerCanvas |
p_canvas
|
PlayerFrame |
p_frame
|
boolean |
packFrame
|
char |
side
|
double |
stamina
|
float |
time
|
| Constructor Summary | |
IAS(java.net.InetAddress host,
int port,
java.lang.String team,
boolean goalie)
IAS Constructor Used to open a socket connection with the soccer server, and create the visual frame for interaction by a human competitor. |
|
| Method Summary | |
void |
catchBall(double direction)
catchBall method. |
void |
changeView(java.lang.String angle,
java.lang.String quality)
changeView method. |
void |
dash(double power)
dash method. |
void |
finalize()
finalize destructor method. |
void |
init()
init method. |
void |
kick(double power,
double direction)
kick method. |
static void |
main(java.lang.String[] a)
main method. |
protected void |
mainLoop()
mainLoop method. |
void |
move(double x,
double y)
move method. |
void |
nextCommand()
nextCommand method. |
void |
parseHear(java.lang.String message)
parseHear method. |
protected void |
parseInitCommand(java.lang.String message)
parseInitCommand method. |
void |
parseSensorInformation(java.lang.String message)
parseSensorInformation method. |
java.lang.String |
receive()
receive method. |
void |
say(java.lang.String message)
say method. |
void |
send(java.lang.String message)
send method. |
void |
sensebody()
sensebody method. |
void |
turn(double moment)
turn method. |
void |
turnNeck(double angle)
turnNeck method. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public java.net.DatagramSocket m_socket
public java.net.InetAddress m_host
public int m_port
public java.lang.String m_team
public SensorInput m_brain
public boolean m_goalie
public boolean packFrame
public PlayerFrame p_frame
public PlayerCanvas p_canvas
public java.util.Vector commands
public Command currentCommand
public char side
public double stamina
public float time
public static final int MSG_SIZE
| Constructor Detail |
public IAS(java.net.InetAddress host,
int port,
java.lang.String team,
boolean goalie)
throws java.net.SocketException
host - Host URL or IP Address of the soccer serverport - Port which is used by the soccer serverteam - Teamname of the IAS playergoalie - Boolean flag which indicates whether this player is a goaliejava.net.SocketException - | Method Detail |
public static void main(java.lang.String[] a)
throws java.net.SocketException,
java.io.IOException
a - String array consisting of the parameters from the command line.java.net.SocketException - java.io.IOException - public void finalize()
finalize in class java.lang.Object
protected void mainLoop()
throws java.io.IOException
java.io.IOException -
public void move(double x,
double y)
move in interface SendCommandx - x-coordinate of the fieldy - y-coordinate of the fieldpublic void turn(double moment)
turn in interface SendCommandmoment - Angle at which to turn the playerpublic void turnNeck(double angle)
turnNeck in interface SendCommandangle - Angle at which to turn the player's neckpublic void dash(double power)
dash in interface SendCommandpower - Power at which to run (maximum of 100)public void catchBall(double direction)
catchBall in interface SendCommanddirection - Direction in which to attempt a catch of the ball
public void kick(double power,
double direction)
kick in interface SendCommandpower - Power with which to kick the ball (maximum 100)direction - Direction, or angle, to kick the ballpublic void say(java.lang.String message)
say in interface SendCommandmessage - Message that the current player wishes to communicate
public void changeView(java.lang.String angle,
java.lang.String quality)
changeView in interface SendCommandangle - Angle to change the view toquality - Quality to change the view topublic void sensebody()
sensebody in interface SendCommand
protected void parseInitCommand(java.lang.String message)
throws java.io.IOException
message - Init command message from the serverjava.io.IOException - public void init()
public void parseSensorInformation(java.lang.String message)
message - Server sensory messagepublic void parseHear(java.lang.String message)
message - Hear command message from the serverpublic void send(java.lang.String message)
message - Message to send to the serverpublic java.lang.String receive()
public void nextCommand()
nextCommand in interface SendCommand
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||