|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJTP.Tile
JTP.StartableTile
JTP.ArwTile
public class ArwTile
Direction restricted tile (startable). Note: At least 1 and at most 3 directions can be restricted.
Field Summary | |
---|---|
static int |
DOWN
Indicates downward/south direction. |
static int |
LEFT
Indicates left/west direction. |
static int |
RIGHT
Indicates right/east direction. |
static int |
UP
Indicates upward/north direction. |
Fields inherited from class JTP.StartableTile |
---|
levelStart |
Fields inherited from class JTP.Tile |
---|
ARROW, GRAVITY, height, ICE, NORMAL, TELEPORT, type |
Constructor Summary | |
---|---|
ArwTile(int height,
boolean levelStart,
boolean[] directions)
Constructs a new ArwTile instance with the given attributes. |
Method Summary | |
---|---|
boolean |
allowsDirection(int dir)
Check whether a particular direction is not restricted. |
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 JTP.StartableTile |
---|
decHeight, isStart, isStartable, setHeight, setStart, tileCheck, transferAttributesFrom, transferAttributesFrom |
Methods inherited from class JTP.Tile |
---|
getHeight, getType, incHeight |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int UP
public static final int DOWN
public static final int LEFT
public static final int RIGHT
Constructor Detail |
---|
public ArwTile(int height, boolean levelStart, boolean[] directions) throws NullPointerException, TileException
ArwTile
instance with the given attributes.
height
- of the pilelevelStart
- indicates whether this is a startdirections
- details which directions are restricted
NullPointerException
- if directions
is
null
.
TileException
- if either height
or the combination of
of restricted directions is invalid.Method Detail |
---|
public boolean allowsDirection(int dir)
dir
- one of UP
, DOWN
, LEFT
or
RIGHT
true
if the direction is allowed.public boolean equalsApartFromHeight(Tile t)
equalsApartFromHeight
in class Tile
t
- the Tile
instance to compare the current tile with.
true
if the two Tile
instances
are equal disregarding their heights.public Tile copy()
copy
in class Tile
Tile
instance.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |