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
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 |
OpponentRobot
public OpponentRobot(World world,
int id)
- Creates an opponent robot.
- Parameters:
world
- The world this robot resides in.id
- The robot ID.
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.