Overview
Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
B
C
D
E
G
I
L
M
N
O
P
R
S
T
U
W
B
BaseTile
- class world.
BaseTile
.
Class that implements home base tiles for the ICFP-2002 programming contest entry.
BaseTile(Board, int, int)
- Constructor for class world.
BaseTile
Creates a home base tile.
Board
- class world.
Board
.
Class that implements the board for the ICFP-2002 programming contest entry.
Board(int, int)
- Constructor for class world.
Board
Creates the board.
C
Command
- class player.
Command
.
Abstract class that implements robot commmands to send to the game server.
Command()
- Constructor for class player.
Command
Creates a robot command.
compareTo(Object)
- Method in class world.
Robot
Compares this object with the specified object for order.
compareTo(Object)
- Method in class world.
Tile
Compares this object with the specified object for order.
compareTo(Object)
- Method in class world.
PathKey
Compares this object with the specified object for order.
compareTo(Object)
- Method in class world.
Pkg
Compares this object with the specified object for order.
Connection
- class protocol.
Connection
.
Class to manage the connection between a player and the ICFP-2002 programming server.
Connection(Socket)
- Constructor for class protocol.
Connection
Creates a connection between a player and the game server (on the argument socket).
Connection(Socket, PrintStream)
- Constructor for class protocol.
Connection
Creates a connection between a player and the game server (on the argument socket).
D
Direction
- interface world.
Direction
.
Interface that implements the direction constants.
drop(int)
- Method in class world.
Robot
Method to drop a package.
DropCommand
- class player.
DropCommand
.
Class that implements robot drop commmands.
DropCommand()
- Constructor for class player.
DropCommand
Creates a robot command.
DumbHeadNorth
- class player.strategy.
DumbHeadNorth
.
A dumb "head north" strategy.
DumbHeadNorth()
- Constructor for class player.strategy.
DumbHeadNorth
Creates a dumb "head north" player strategy.
DumbSitAndWait
- class player.strategy.
DumbSitAndWait
.
A dumb sit-and-wait strategy.
DumbSitAndWait()
- Constructor for class player.strategy.
DumbSitAndWait
Creates a dumb sit-and-wait player strategy.
E
EAST
- Static variable in interface world.
Direction
empty()
- Method in class world.
Sack
Method to clear all packages (empty) from the sack.
end
- Variable in class world.
PathKey
G
get(int)
- Method in class world.
IdMap
Gets the object from the map.
getArguments()
- Method in class player.
Command
Method to get the optional arguments for a command
getArguments()
- Method in class player.
PkgCommand
getArguments()
- Method in class player.
NoopCommand
getArguments()
- Method in class player.
MoveCommand
getBid()
- Method in class player.
Command
Method to get the bid for this command.
getBoard()
- Method in class world.
Tile
Method to get the containing board.
getBoard()
- Method in class world.
World
Method to get world's playing board.
getCapacity()
- Method in class world.
Robot
Method to get the robot's capacity.
getColumn()
- Method in class world.
Tile
Method to get the tile column.
getColumnCount()
- Method in class world.
Board
Gets the board's column count.
getColumnCount()
- Method in class world.
IdMapTableModel
getColumnName(int)
- Method in class world.
IdMapTableModel
getConnection()
- Method in class player.
Player
Method to get the player's connection.
getCost()
- Method in class player.
Command
Method to get the cost of this command.
getCount()
- Method in class world.
Sack
Method to get the sack's package count.
getDestination()
- Method in class world.
Pkg
Method to get the package's destination position.
getDistance()
- Method in class world.
Path
getEnd()
- Method in class world.
PathKey
getErr()
- Method in class gui.
TTY
Method to get the error stream.
getId()
- Method in class world.
Robot
Method to get the robot ID.
getId()
- Method in interface world.
ID
Method to get the object ID.
getId()
- Method in class world.
Pkg
Method to get the package ID.
getIn()
- Method in class gui.
TTY
Method to get the input stream.
getLoad()
- Method in class world.
Robot
Method to get the robot's current load.
getMoney()
- Method in class world.
PlayerRobot
Method to get the robot's money.
getName()
- Method in class player.
Command
Method to get the name of this command.
getName()
- Method in class player.
DropCommand
getName()
- Method in class player.
NoopCommand
getName()
- Method in class player.
MoveCommand
getName()
- Method in class player.
PickCommand
getNeighbor(int)
- Method in class world.
Tile
Method to get the tile's neighbor.
getOpponentMoves()
- Method in class world.
World
Method to get the set of possible opponent robot moves.
getOpponentPositions()
- Method in class world.
World
Method to get the set of opponent robot positions.
getOrdinal()
- Method in class world.
Tile
Method to get an ordinal ordering for this tile with the other tiles in its board.
getOrdinal()
- Method in class world.
PathKey
Method to get an ordinal ordering for this path with the other paths in its board.
getOut()
- Method in class gui.
TTY
Method to get the output stream.
getPassages()
- Method in class world.
Tile
Method to get the set of possible passages from this tile.
getPath(Tile, Tile)
- Method in class world.
Board
Method to return the path from the start tile to the end tile.
getPathTo(Tile)
- Method in class world.
Tile
Method to return the path from this tile to the end tile.
getPkgs()
- Method in class world.
Sack
Method to get the sack's packages.
getPlayer()
- Method in class player.
Strategy
Method to get the strategy's player.
getPlayerRobot()
- Method in class player.
Player
Method to get the player's robot.
getReader()
- Method in class protocol.
Connection
Method to get a reader for the connection socket.
getRobotMap()
- Method in class world.
World
Method to get robot map.
getRow()
- Method in class world.
Tile
Method to get the tile row.
getRowCount()
- Method in class world.
Board
Gets the board's row count.
getRowCount()
- Method in class world.
IdMapTableModel
getSack()
- Method in class world.
Robot
Method to get the tile's sack.
getSack()
- Method in class world.
Tile
Method to get the tile's sack.
getScore()
- Method in class world.
Robot
Method to get the robot score.
getSocket()
- Method in class protocol.
Connection
Method to get the
Socket
used for communicating to the game server on this connection.
getStart()
- Method in class world.
PathKey
getSteps()
- Method in class world.
Path
getTableModel()
- Method in class world.
IdMap
Returns a table model for displaying the IdMap.
getTableModel()
- Method in class world.
RobotMap
Returns a table model for displaying the RobotMap.
getTableModel()
- Method in class world.
World
Returns a table model for displaying the world map.
getTableModel()
- Method in class world.
Sack
Returns a table model for displaying the sack.
getTile()
- Method in interface world.
Locality
Method to get the location tile.
getTile()
- Method in class world.
Robot
Method to get the robot's [location] tile.
getTile()
- Method in class world.
Tile
Method to return tile.
getTile(int, int)
- Method in class world.
Board
Gets a tile on the board.
getTiles()
- Method in class world.
Board
Gets the board's tiles.
getTiles()
- Method in class world.
Path
getTrail()
- Method in class world.
Robot
getTrailList()
- Method in class world.
Robot
getTTY()
- Method in class gui.
GUI
Method to get GUI's TTY..
getTurn()
- Method in class world.
World
Method to get the current turn.
getValueAt(int, int)
- Method in class world.
IdMapTableModel
getWeight()
- Method in class world.
Pkg
Method to get the package's weight.
getWeight()
- Method in class world.
Sack
Method to get the sack's total weight.
getWorld()
- Method in class player.
Player
Method to get the player's world.
getWorld()
- Method in class world.
Robot
Method to get the robot's world of residence.
getWriter()
- Method in class protocol.
Connection
Method to get a writer for the connection socket.
gui
- package gui
GUI
- class gui.
GUI
.
This class implements a GUI for monitoring the game world.
GUI(String, World, Player)
- Constructor for class gui.
GUI
Creates the GUI to monitor the world.
I
ID
- interface world.
ID
.
Interface to specify an object is comparable and has the
ID.getId()
method.
IdMap
- class world.
IdMap
.
Class that implements an ID map.
IdMap()
- Constructor for class world.
IdMap
Creates an ID map.
IdMapTableModel
- class world.
IdMapTableModel
.
This class implements a TableModel for
IdMap
s.
IdMapTableModel(IdMap)
- Constructor for class world.
IdMapTableModel
initialize(Player)
- Method in class player.
Strategy
Method to initialize the strategy.
initialize(Player)
- Method in class player.strategy.
PlanA
Method to initialize the Plan A strategy.
isConnected()
- Method in class world.
Path
isLethal()
- Method in class world.
Tile
Method to determine if the tile is lethal.
isLethal()
- Method in class world.
BaseTile
isLethal()
- Method in class world.
WaterTile
isLethal()
- Method in class world.
WallTile
isLethal()
- Method in class world.
PlainTile
isPassable()
- Method in class world.
Tile
Method to determine if the tile is passable.
isPassable()
- Method in class world.
BaseTile
isPassable()
- Method in class world.
WaterTile
isPassable()
- Method in class world.
WallTile
isPassable()
- Method in class world.
PlainTile
isVulnerable()
- Method in class world.
Robot
Method to determine if the robot is vulnerable.
L
Locality
- interface world.
Locality
.
Interface to specify an object which has locality in the world (associated with a tile).
M
Main
- class player.
Main
.
Provides the main() function for the robot, a ICFP-2002 programming contest entry.
main(String[])
- Static method in class player.
Main
Static main() function for the robot application.
MoveCommand
- class player.
MoveCommand
.
Class that implements robot move commmands.
MoveCommand()
- Constructor for class player.
MoveCommand
Creates a robot command.
moveEast()
- Method in class world.
Robot
Method to move the robot East.
moveNorth()
- Method in class world.
Robot
Method to move the robot North.
moveSouth()
- Method in class world.
Robot
Method to move the robot South.
moveWest()
- Method in class world.
Robot
Method to move the robot West.
N
nextCommand()
- Method in class player.
Strategy
Method to calculate the player's robot next command.
nextCommand()
- Method in class player.strategy.
PlanA
Method to calculate the player's robot next command using "Plan A."
nextCommand()
- Method in class player.strategy.
NoStrategy
Method to calculate the player's robot next command using the "no strategy" strategy;
nextCommand()
- Method in class player.strategy.
DumbSitAndWait
nextCommand()
- Method in class player.strategy.
DumbHeadNorth
NoopCommand
- class player.
NoopCommand
.
Class that implements robot pick[-up] commmands.
NoopCommand()
- Constructor for class player.
NoopCommand
Creates a robot command.
NORTH
- Static variable in interface world.
Direction
NoStrategy
- class player.strategy.
NoStrategy
.
This class implements the "no strategy" strategy.
NoStrategy()
- Constructor for class player.strategy.
NoStrategy
Creates a "no strategy" strategy.
notifyTurn()
- Method in class gui.
GUI
Method to notify GUI game turn is complete.
O
OpponentRobot
- class world.
OpponentRobot
.
Class that implements robots for the ICFP-2002 programming contest entry.
OpponentRobot(World, int)
- Constructor for class world.
OpponentRobot
Creates an opponent robot.
P
Path
- class world.
Path
.
Class to record paths through tiles.
Path(Tile, Tile)
- Constructor for class world.
Path
Creates a path for a start and an end which cannot be connected.
Path(Tile, Tile, Tile[], int[])
- Constructor for class world.
Path
Creates a path.
PathKey
- class world.
PathKey
.
Class to record paths through tiles.
PathKey(Tile, Tile)
- Constructor for class world.
PathKey
Creates a path key.
pick(int)
- Method in class world.
Robot
Method to pick[-up] a package.
pick(int)
- Method in class world.
OpponentRobot
PickCommand
- class player.
PickCommand
.
Class that implements robot pick[-up] commmands.
PickCommand()
- Constructor for class player.
PickCommand
Creates a robot command.
Pkg
- class world.
Pkg
.
Class that implements packages for the ICFP-2002 programming contest entry.
Pkg(int, int, Tile)
- Constructor for class world.
Pkg
Creates a package.
pkgAdd(Pkg)
- Method in class player.
Command
Method to add a package to the command package list.
pkgAdd(Pkg)
- Method in class player.
PkgCommand
Method to add a package to the command package list.
PkgCommand
- class player.
PkgCommand
.
Abstract class that implements robot package commmands.
PkgCommand()
- Constructor for class player.
PkgCommand
Creates a robot command.
pkgRemove(Pkg)
- Method in class player.
Command
Method to remove a package to the command package list.
pkgRemove(Pkg)
- Method in class player.
PkgCommand
Method to remove a package from the command package list.
PlainTile
- class world.
PlainTile
.
Class that implements plain tiles for the ICFP-2002 programming contest entry.
PlainTile(Board, int, int)
- Constructor for class world.
PlainTile
Creates a plain tile.
PlanA
- class player.strategy.
PlanA
.
This class implements the Plan A strategy.
PlanA()
- Constructor for class player.strategy.
PlanA
Creates a Plan A strategy.
player
- package player
player
- Variable in class player.
Strategy
The player who owns the strategy.
Player
- class player.
Player
.
Class that implements a player in the ICFP-2002 programming contest.
player.strategy
- package player.strategy
Player(World)
- Constructor for class player.
Player
Creates a player thread.
PlayerRobot
- class world.
PlayerRobot
.
Class that implements robots for the ICFP-2002 programming contest entry.
PlayerRobot(World, int, int, int)
- Constructor for class world.
PlayerRobot
Creates a player robot.
protocol
- package protocol
put(ID)
- Method in class world.
IdMap
Puts the object into the map.
put(Pkg)
- Method in class world.
Sack
Method to add a package to the sack.
R
read()
- Method in class protocol.
Connection
Read a line of text from the game server discarding line terminator(s).
remove(int)
- Method in class world.
IdMap
Removes the object from the map.
remove(int)
- Method in class world.
Sack
Method to remove a package from a the sack.
remove(Pkg)
- Method in class world.
Sack
Method to remove a package from a the sack.
Robot
- class world.
Robot
.
Class that implements robots for the ICFP-2002 programming contest entry.
Robot(World, int, int)
- Constructor for class world.
Robot
Creates a robot.
RobotMap
- class world.
RobotMap
.
Class that implements an ID map.
RobotMap()
- Constructor for class world.
RobotMap
Creates an ID map.
run()
- Method in class player.
Main
Does the work of setting up and starting the player.
run()
- Method in class player.
Player
S
Sack
- class world.
Sack
.
Class that implements a container for packages.
Sack()
- Constructor for class world.
Sack
Creates a sack.
send(Object)
- Method in class protocol.
Connection
Sends the argument object (by invoking its
Object.toString()
method) to the server with the proper line terminator(s).
send(String)
- Method in class protocol.
Connection
Sends the argument string to the server with the proper line terminator(s).
setBid(int)
- Method in class player.
Command
Method to set the bid for this command.
setBoard(Board)
- Method in class world.
World
Method to set world's playing board.
setCapacity(int)
- Method in class world.
Robot
Method to set the robot's capacity.
setConnection(Connection)
- Method in class player.
Player
Method to set the player's connection.
setDirection(int)
- Method in class player.
Command
Method to set the movement direction of this command.
setDirection(int)
- Method in class player.
MoveCommand
Method to set the movement direction of this command.
setGUI(GUI)
- Method in class player.
Player
Method to set the GUI interface.
setJTablePreferredWidths(JTable)
- Static method in class gui.
Util
Method to set the preferred widths of JTable cells to better show the contents.
setMoney(int)
- Method in class world.
PlayerRobot
Method to set the robot's money.
setScore(int)
- Method in class world.
Robot
Method to set the robot score.
setTile(Tile)
- Method in class world.
Robot
Method to set the robot's [location] tile.
setTile(Tile)
- Method in class world.
Board
Sets a tile into the board.
SOUTH
- Static variable in interface world.
Direction
start
- Variable in class world.
PathKey
Strategy
- class player.
Strategy
.
Abstract Class that implements a player strategy for the ICFP-2002 programming contest.
Strategy()
- Constructor for class player.
Strategy
Creates a player strategy.
T
Tile
- class world.
Tile
.
Abstract class that implements board tiles for the ICFP-2002 programming contest entry.
Tile(Board, int, int)
- Constructor for class world.
Tile
Creates a tile.
toString()
- Method in class player.
Command
Method to return the command as a well formatted string suitable for sending to the game server.
toString()
- Method in class world.
Robot
Method to get a string description of the robot.
toString()
- Method in class world.
OpponentRobot
toString()
- Method in class world.
PlayerRobot
TTY
- class gui.
TTY
.
TTY extends the JTextArea to provide a Swing componeent which may serve as a terminal emulator.
TTY()
- Constructor for class gui.
TTY
Creates a TTY with the default number of rows and columns (24x80).
TTY(int, int)
- Constructor for class gui.
TTY
Creates a TTY with the argument number of rows and columns.
TTY(int, int, int)
- Constructor for class gui.
TTY
Creates a TTY with the argument number of rows and columns.
turn()
- Method in class world.
World
Method to move to the next turn.
U
Util
- class gui.
Util
.
Static class to provide utility functions for working with GUI components.
W
WallTile
- class world.
WallTile
.
Class that implements wall tiles for the ICFP-2002 programming contest entry.
WallTile(Board, int, int)
- Constructor for class world.
WallTile
Creates a wall tile.
WaterTile
- class world.
WaterTile
.
Class that implements water tiles for the ICFP-2002 programming contest entry.
WaterTile(Board, int, int)
- Constructor for class world.
WaterTile
Creates a water tile.
WEST
- Static variable in interface world.
Direction
world
- package world
World
- class world.
World
.
Class that implements the World representation for the simulation in the ICFP-2002 programming contest.
World()
- Constructor for class world.
World
Creates the World.
B
C
D
E
G
I
L
M
N
O
P
R
S
T
U
W
Overview
Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
Copyright 2002 Allen D. Ball. All rights reserved.