Class Player
java.lang.Object
|
+--Player
- public class Player
- extends java.lang.Object
This class is the player, it has the robot and tries to
follow whats happening....
Inner Class Summary |
private class |
Player.Communicator
This is the class that is the bridge
between the player and the server |
Constructor Summary |
Player()
Constructs a new Player |
Method Summary |
private void |
gameMainLoop()
|
void |
play(java.lang.String sname,
int sport)
The function where it all starts |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
NORTH
public static final int NORTH
- Directions
SOUTH
public static final int SOUTH
WEST
public static final int WEST
EAST
public static final int EAST
dirs
public static final java.lang.String[] dirs
robot
private Robot robot
- The robot
map
private GameMap map
- The map
comm
private Player.Communicator comm
- The Communications manager
packs
java.util.LinkedList packs
- The package the robot is carrying
Player
public Player()
- Constructs a new Player
play
public void play(java.lang.String sname,
int sport)
- The function where it all starts
- Parameters:
sname
- The name of the serversport
- The port where the host is listening
gameMainLoop
private void gameMainLoop()