JTP
Class IceTile
java.lang.Object
JTP.Tile
JTP.IceTile
- All Implemented Interfaces:
- Serializable
public class IceTile
- extends Tile
Ice tile
- Author:
- V.Termanis
- See Also:
- Serialized Form
Constructor Summary |
IceTile(int height)
Constructs a new IceTile instance with the given attributes. |
Method Summary |
Tile |
copy()
Creates an exact (non-shallow) copy of the current tile |
boolean |
equalsApartFromHeight(Tile t)
Used to compare two tiles, ignoring their respective heights. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IceTile
public IceTile(int height)
throws TileException
- Constructs a new
IceTile
instance with the given attributes.
- Parameters:
height
- of the pile
- Throws:
TileException
- if the height is not valid.
equalsApartFromHeight
public boolean equalsApartFromHeight(Tile t)
- Used to compare two tiles, ignoring their respective heights.
- Overrides:
equalsApartFromHeight
in class Tile
- Parameters:
t
- the Tile
instance to compare the current tile with.
- Returns:
true
if the two Tile
instances
are equal disregarding their heights.
copy
public Tile copy()
- Creates an exact (non-shallow) copy of the current tile
- Overrides:
copy
in class Tile
- Returns:
- a copy of the
Tile
instance.