|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--Brain
Brain class. Used to receive and send command information from and to the server. In fully automated teams, this class is responsible for invoking the decision making process. However, for IAS, this decision making is left up to the individual human player.
Field Summary | |
boolean |
m_hasMoved
|
SendCommand |
m_IAS
|
Memory |
m_memory
|
boolean |
m_resetPosition
|
char |
m_side
|
protected boolean |
m_timeOver
|
PlayerCanvas |
p_canvas
|
Fields inherited from class java.lang.Thread |
contextClassLoader, daemon, eetop, group, inheritableThreadLocals, inheritedAccessControlContext, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadLocals, threadQ |
Constructor Summary | |
Brain(SendCommand IAS,
java.lang.String team,
char side,
int number,
java.lang.String playMode)
Brain constructor. |
Method Summary | |
void |
hear(int time,
int direction,
java.lang.String message)
Hear method declared in the SensorInput interface. |
void |
hear(int time,
java.lang.String message)
Hear method declared in the SensorInput interface. |
void |
resetPlayerPosition()
ResetPlayerPosition method. |
void |
run()
Run method. |
void |
see(VisualInfo info)
See method declared in the SensorInput interface. |
void |
sense(SenseBodyInfo info)
Sense method declared in the SensorInput interface. |
Methods inherited from class java.lang.Thread |
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public SendCommand m_IAS
public Memory m_memory
public char m_side
public boolean m_hasMoved
public boolean m_resetPosition
protected volatile boolean m_timeOver
public PlayerCanvas p_canvas
Constructor Detail |
public Brain(SendCommand IAS, java.lang.String team, char side, int number, java.lang.String playMode)
IAS
- The main IAS command interfaceteam
- The teamname for which the IAS player is a member ofside
- The side of the field which the IAS team is on - either 'l' or 'r'number
- The uniform number for the IAS playerplayMode
- The current play_mode of the game.Method Detail |
public void run()
run
in class java.lang.Thread
public void see(VisualInfo info)
see
in interface SensorInput
info
- The current visual information received from the server.public void sense(SenseBodyInfo info)
sense
in interface SensorInput
info
- The current sense_body information received from the server.public void hear(int time, int direction, java.lang.String message)
hear
in interface SensorInput
time
- The cycle number of the game which the hear message was generated.direction
- The approximate angle direction that the message was received.message
- The actual message heardpublic void hear(int time, java.lang.String message)
hear
in interface SensorInput
time
- The cycle number of the game which the hear message was generated.message
- The actual message heardpublic void resetPlayerPosition()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |