world
Class Board
java.lang.Object
|
+--world.Board
- All Implemented Interfaces:
- Direction
- public class Board
- extends Object
- implements Direction
Class that implements the board for the ICFP-2002 programming contest
entry.
- Version:
- $Revision: 1.6 $
- Author:
- Allen D. Ball
Constructor Summary |
Board(int rows,
int columns)
Creates the board. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Board
public Board(int rows,
int columns)
- Creates the board.
- Parameters:
rows
- The number of board rows.columns
- The number of board columns.
getRowCount
public int getRowCount()
- Gets the board's row count.
- Returns:
- The number or rows.
getColumnCount
public int getColumnCount()
- Gets the board's column count.
- Returns:
- The number or columns.
getTiles
public Tile[][] getTiles()
- Gets the board's tiles.
- Parameters:
row
- The row position of the tile.column
- The column position of the tile.- Returns:
- The two-dimensional array of tiles.
getTile
public Tile getTile(int row,
int column)
- Gets a tile on the board.
- Parameters:
row
- The row position of the tile.column
- The column position of the tile.- Returns:
- The tile at the specified position.
setTile
public void setTile(Tile tile)
- Sets a tile into the board.
- Parameters:
tile
- The tile to install.
getPath
public Path getPath(Tile start,
Tile end)
- Method to return the path from the start tile to the end tile.
- Parameters:
start
- The start tile of the path.end
- The end tile of the path.- Returns:
- The path from start to end.
Copyright 2002 Allen D. Ball. All rights reserved.