world
Class OpponentRobot

java.lang.Object
  |
  +--world.Robot
        |
        +--world.OpponentRobot
All Implemented Interfaces:
Comparable, ID, Locality

public class OpponentRobot
extends Robot

Class that implements robots for the ICFP-2002 programming contest entry.

Version:
$Revision: 1.2 $
Author:
Allen D. Ball

Constructor Summary
OpponentRobot(World world, int id)
          Creates an opponent robot.
 
Method Summary
 void pick(int id)
          Method to pick[-up] a package.
 String toString()
          Method to get a string description of the robot.
 
Methods inherited from class world.Robot
compareTo, drop, getCapacity, getId, getLoad, getSack, getScore, getTile, getTrail, getTrailList, getWorld, isVulnerable, moveEast, moveNorth, moveSouth, moveWest, setCapacity, setScore, setTile
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OpponentRobot

public OpponentRobot(World world,
                     int id)
Creates an opponent robot.
Parameters:
world - The world this robot resides in.
id - The robot ID.
Method Detail

pick

public void pick(int id)
Description copied from class: Robot
Method to pick[-up] a package.
Overrides:
pick in class Robot
Following copied from class: world.Robot
Parameters:
id - The package ID of the package to be picked.

toString

public String toString()
Description copied from class: Robot
Method to get a string description of the robot.
Overrides:
toString in class Robot
Following copied from class: world.Robot
Returns:
The string describing the robot.


Copyright 2002 Allen D. Ball. All rights reserved.