world
Class WaterTile

java.lang.Object
  |
  +--world.Tile
        |
        +--world.WaterTile
All Implemented Interfaces:
Comparable, Direction, Locality

public class WaterTile
extends Tile

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

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

Fields inherited from interface world.Direction
EAST, NORTH, SOUTH, WEST
 
Constructor Summary
WaterTile(Board board, int row, int column)
          Creates a water tile.
 
Method Summary
 boolean isLethal()
          Method to determine if the tile is lethal.
 boolean isPassable()
          Method to determine if the tile is passable.
 
Methods inherited from class world.Tile
compareTo, getBoard, getColumn, getNeighbor, getOrdinal, getPassages, getPathTo, getRow, getSack, getTile
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WaterTile

public WaterTile(Board board,
                 int row,
                 int column)
Creates a water tile.
Parameters:
board - The playing board.
row - The row position of the tile.
column - The column position of the tile.
See Also:
Position
Method Detail

isPassable

public final boolean isPassable()
Description copied from class: Tile
Method to determine if the tile is passable.
Overrides:
isPassable in class Tile
Following copied from class: world.Tile
Returns:
True if a robot may occupy the space; false otherwise.

isLethal

public final boolean isLethal()
Description copied from class: Tile
Method to determine if the tile is lethal.
Overrides:
isLethal in class Tile
Following copied from class: world.Tile
Returns:
True if a robot will be killed if it enters the tile; false otherwise.


Copyright 2002 Allen D. Ball. All rights reserved.