|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--world.Tile
Abstract class that implements board tiles for the ICFP-2002 programming contest entry.
Fields inherited from interface world.Direction |
EAST, NORTH, SOUTH, WEST |
Constructor Summary | |
protected |
Tile(Board board,
int row,
int column)
Creates a tile. |
Method Summary | |
int |
compareTo(Object object)
Compares this object with the specified object for order. |
Board |
getBoard()
Method to get the containing board. |
int |
getColumn()
Method to get the tile column. |
Tile |
getNeighbor(int direction)
Method to get the tile's neighbor. |
int |
getOrdinal()
Method to get an ordinal ordering for this tile with the other tiles in its board. |
TreeSet |
getPassages()
Method to get the set of possible passages from this tile. |
Path |
getPathTo(Tile end)
Method to return the path from this tile to the end tile. |
int |
getRow()
Method to get the tile row. |
Sack |
getSack()
Method to get the tile's sack. |
Tile |
getTile()
Method to return tile. |
abstract boolean |
isLethal()
Method to determine if the tile is lethal. |
abstract boolean |
isPassable()
Method to determine if the tile is passable. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
protected Tile(Board board, int row, int column)
board
- The playing board.row
- The row position of the tile.column
- The column position of the tile.Position
Method Detail |
public Board getBoard()
public int getRow()
public int getColumn()
public Sack getSack()
public Tile getTile()
getTile
in interface Locality
public Tile getNeighbor(int direction)
Direction
public abstract boolean isPassable()
public TreeSet getPassages()
Tile
public abstract boolean isLethal()
public Path getPathTo(Tile end)
end
- The end tile of the path.public int compareTo(Object object)
compareTo
in interface Comparable
object
- The object to be compared.Comparable
public int getOrdinal()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |