|
|||||||
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
|
private int |
CONNECTED
|
private int |
NOT_CONNECTED
|
private int |
PLAYING
|
private Sensor |
sensor
|
private int |
status
|
private java.lang.String |
teamName
|
private ObjectInfo |
theBall
|
private ObjectInfo |
theGoal
|
private int |
time
|
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 had to overwritten 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 Sensor sensor
private java.lang.String teamName
private final int NOT_CONNECTED
private final int CONNECTED
private final int PLAYING
private int status
private ObjectInfo theBall
private ObjectInfo 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 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()
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 |