world
Class World

java.lang.Object
  |
  +--world.World

public class World
extends Object

Class that implements the World representation for the simulation in the ICFP-2002 programming contest.

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

Constructor Summary
World()
          Creates the World.
 
Method Summary
 Board getBoard()
          Method to get world's playing board.
 TreeSet getOpponentMoves()
          Method to get the set of possible opponent robot moves.
 TreeSet getOpponentPositions()
          Method to get the set of opponent robot positions.
 RobotMap getRobotMap()
          Method to get robot map.
 TableModel getTableModel()
          Returns a table model for displaying the world map.
 int getTurn()
          Method to get the current turn.
 void setBoard(Board board)
          Method to set world's playing board.
 void turn()
          Method to move to the next turn.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

World

public World()
Creates the World.
Method Detail

getTurn

public int getTurn()
Method to get the current turn.
Returns:
The current turn.

turn

public void turn()
Method to move to the next turn.

getBoard

public Board getBoard()
Method to get world's playing board.
Returns:
The playing board.

setBoard

public void setBoard(Board board)
Method to set world's playing board.
Parameters:
board - The playing board.

getRobotMap

public RobotMap getRobotMap()
Method to get robot map.
Returns:
The map of robots on this board.

getOpponentPositions

public TreeSet getOpponentPositions()
Method to get the set of opponent robot positions.
Returns:
A sorted set of tiles.
See Also:
Tile

getOpponentMoves

public TreeSet getOpponentMoves()
Method to get the set of possible opponent robot moves.
Returns:
A sorted set of tiles.
See Also:
Tile

getTableModel

public TableModel getTableModel()
Returns a table model for displaying the world map.


Copyright 2002 Allen D. Ball. All rights reserved.