net.mazewar
Class RobotClient

java.lang.Object
  extended by net.mazewar.Client
      extended by net.mazewar.LocalClient
          extended by net.mazewar.RobotClient
All Implemented Interfaces:
java.lang.Runnable

public class RobotClient
extends LocalClient
implements java.lang.Runnable

A very naive implementation of a computer controlled LocalClient. Basically it stumbles about and shoots.

Version:
$Id: RobotClient.java 345 2004-01-24 03:56:27Z geoffw $
Author:
Geoffrey Washburn <geoffw@cis.upenn.edu>

Constructor Summary
RobotClient(java.lang.String name)
          Create a computer controlled LocalClient.
 
Method Summary
 void registerMaze(Maze maze)
          Override the abstract Client's registerMaze method so that we know when to start control thread.
 void run()
          This method is the control loop for an active RobotClient.
 void unregisterMaze()
          Override the abstract Client's unregisterMaze method so we know when to stop the control thread.
 
Methods inherited from class net.mazewar.Client
addClientListener, getName, getOrientation, getPoint, removeClientListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RobotClient

public RobotClient(java.lang.String name)
Create a computer controlled LocalClient.

Parameters:
name - The name of this RobotClient.
Method Detail

registerMaze

public void registerMaze(Maze maze)
Override the abstract Client's registerMaze method so that we know when to start control thread.

Overrides:
registerMaze in class Client
Parameters:
maze - The Maze that we are begin registered with.

unregisterMaze

public void unregisterMaze()
Override the abstract Client's unregisterMaze method so we know when to stop the control thread.

Overrides:
unregisterMaze in class Client

run

public void run()
This method is the control loop for an active RobotClient.

Specified by:
run in interface java.lang.Runnable