JTP
Class GameTile

java.lang.Object
  extended by JTP.GameTile

public class GameTile
extends Object

Wrapper for Tile used in-game.

Author:
V.Termanis

Constructor Summary
GameTile(Tile tile)
          Creates a new GameTile instance with the given from the given Tile.
 
Method Summary
 boolean decHeight()
          Decreases height of this tile by one.
 void disable()
          Sets disable flag for this tile.
 int getHeight()
          Returns the height of this tile pile.
 Tile getTile()
          Returns the tile within this wrapper.
 int getType()
          Returns the type of tile.
 boolean isDisabled()
          Returns whether a player has died here.
 void reset()
          Resets height specified in wrapper to that of the referenced Tile instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GameTile

public GameTile(Tile tile)
         throws NullPointerException
Creates a new GameTile instance with the given from the given Tile. Note: No copy is made of the original Tile

Parameters:
tile - the tile to wrap
Throws:
NullPointerException - if tile is null
Method Detail

getHeight

public int getHeight()
Returns the height of this tile pile.

Returns:
height of this pile

isDisabled

public boolean isDisabled()
Returns whether a player has died here.

Returns:
true if either of the players has died here.

disable

public void disable()
Sets disable flag for this tile. Note: Using the reset() method will clear this flag.


getType

public int getType()
Returns the type of tile. Note: See Tile class for possible types.

Returns:
the type of this tile

getTile

public Tile getTile()
Returns the tile within this wrapper.

Returns:
the original tile

decHeight

public boolean decHeight()
Decreases height of this tile by one. Note: The height of the referenced Tile instance is not altered. Using the reset() method will return this tile to its original height.

Returns:
true if height has changed

reset

public void reset()
Resets height specified in wrapper to that of the referenced Tile instance.