world
Class PlayerRobot

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

public class PlayerRobot
extends Robot

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

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

Constructor Summary
PlayerRobot(World world, int id, int capacity, int money)
          Creates a player robot.
 
Method Summary
 int getMoney()
          Method to get the robot's money.
 void setMoney(int money)
          Method to set the robot's money.
 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, pick, setCapacity, setScore, setTile
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PlayerRobot

public PlayerRobot(World world,
                   int id,
                   int capacity,
                   int money)
Creates a player robot.
Parameters:
world - The world this robot resides in.
id - The robot ID.
money - The robot's money.
Method Detail

getMoney

public int getMoney()
Method to get the robot's money.
Returns:
The robot's money.

setMoney

public void setMoney(int money)
Method to set the robot's money.
Parameters:
money - The robot's money.

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.