us.asciiroth.client.terrain.decorators
Class SecretPassage

java.lang.Object
  extended by us.asciiroth.client.core.AbstractPiece
      extended by us.asciiroth.client.terrain.decorators.Decorator
          extended by us.asciiroth.client.terrain.decorators.Mimic
              extended by 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.


Field Summary
static Serializer<SecretPassage> SERIALIZER
          Type serializer.
 
Method Summary
 boolean canEnter(Agent agent, Cell cell, Direction direction)
          Agents are fooled and treat terrain as it appears.
 boolean canExit(Agent agent, Cell cell, Direction direction)
          Agents are fooled and treat terrain as it appears.
 
Methods inherited from class us.asciiroth.client.terrain.decorators.Mimic
getProxiedTerrain, getSymbol, onAdjacentTo, onNotAdjacentTo, proxy
 
Methods inherited from class us.asciiroth.client.terrain.decorators.Decorator
is, not, onAgentEnter, onAgentExit, onColorEvent, onDrop, onEnter, onExit, onFlyOver, onPickup
 
Methods inherited from class us.asciiroth.client.core.AbstractPiece
getColor, getName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface us.asciiroth.client.core.Piece
getColor, getName
 

Field Detail

SERIALIZER

public static final Serializer<SecretPassage> SERIALIZER
Type serializer.

Method Detail

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)

0.7

© 2009 Alx Dark