|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--Player
This is the central class of the Simpleclient. Here, all visual information is evaluated and converted into decisions resp. actions to:
Field Summary | |
private Actor |
actor
the actor module of the client |
private int |
PLAYING
constant defining the PLAYING status |
private int |
START
constant defining the START status |
private int |
status
current status the player is in; can be START or PLAYING |
private java.lang.String |
teamName
the name of the team (for initialization) |
private ObjectPerception |
theBall
the current information regarding the ball |
private ObjectPerception |
theGoal
the current information regarding the goal |
private int |
time
the actual timestamp of last visual event received |
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 | |
Player(java.lang.String servername,
int serverport,
java.lang.String teamName)
Creates a new Player instance. |
Method Summary | |
static void |
main(java.lang.String[] args)
Starts the client |
private void |
play()
Processes the information gained and transforms it into a decision/action. |
void |
run()
This method overwrites run() from Thread . |
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 |
private Actor actor
private java.lang.String teamName
private final int START
private final int PLAYING
private int status
START
or PLAYING
START
,
PLAYING
private ObjectPerception theBall
private ObjectPerception theGoal
private int time
Constructor Detail |
public Player(java.lang.String servername, int serverport, java.lang.String teamName)
Player
instance.servername
- a String
value specifying the name of the serverserverport
- an int
value specifying the port on which the server
listens for incoming packetsteamName
- a String
value is the name of the team you want to join/createMethod Detail |
public void run()
run()
from Thread
. It is
executed when start()
is called for the Player
Threadrun
in class java.lang.Thread
private void play()
public static void main(java.lang.String[] args)
args
- The arguments passed must specify SERVERNAME PORT TEAMNAME
in this order.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |