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
 
Field Summary
private  Player.Communicator comm
          The Communications manager
static java.lang.String[] dirs
           
static int EAST
           
private  GameMap map
          The map
static int NORTH
          Directions
(package private)  java.util.LinkedList packs
          The package the robot is carrying
private  Robot robot
          The robot
static int SOUTH
           
static int WEST
           
 
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
 

Field Detail

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
Constructor Detail

Player

public Player()
Constructs a new Player
Method Detail

play

public void play(java.lang.String sname,
                 int sport)
The function where it all starts
Parameters:
sname - The name of the server
sport - The port where the host is listening

gameMainLoop

private void gameMainLoop()