us.asciiroth.client.terrain.decorators
Class SecretPassage
java.lang.Object
us.asciiroth.client.core.AbstractPiece
us.asciiroth.client.terrain.decorators.Decorator
us.asciiroth.client.terrain.decorators.Mimic
us.asciiroth.client.terrain.decorators.SecretPassage
- All Implemented Interfaces:
- ColorListener, Piece, Terrain, TerrainProxy
public class SecretPassage
- extends Mimic
A very common kind of mimic, it looks like wall but actually it's a corridor.
In addition, agents are fooled by its appearance and they will not walk into
a secret passage.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SERIALIZER
public static final Serializer<SecretPassage> SERIALIZER
- Type serializer.
canEnter
public boolean canEnter(Agent agent,
Cell cell,
Direction direction)
- Agents are fooled and treat terrain as it appears.
- Specified by:
canEnter
in interface Terrain
- Overrides:
canEnter
in class Decorator
- Returns:
- true if the agent can enter the terrain moving between the
two cells using the indicated direction
- See Also:
Cell.canEnter(Cell, Agent, Direction, boolean)
canExit
public boolean canExit(Agent agent,
Cell cell,
Direction direction)
- Agents are fooled and treat terrain as it appears.
- Specified by:
canExit
in interface Terrain
- Overrides:
canExit
in class Decorator
- Returns:
- true if the agent can leave this cell going in the indicated
direction
- See Also:
Cell.canEnter(Cell, Agent, Direction, boolean)
© 2009 Alx Dark