us.asciiroth.client.terrain
Class FishPool

java.lang.Object
  extended by us.asciiroth.client.core.AbstractPiece
      extended by us.asciiroth.client.terrain.AbstractTerrain
          extended by us.asciiroth.client.terrain.FishPool
All Implemented Interfaces:
Animated, Piece, Terrain

public class FishPool
extends AbstractTerrain
implements Animated

Uncrossable water that can yield a fish, and that evolves the terrain to move this capability around any nearby water. Must be a decorator to work for both water and ocean; implements the same behavior as LowImpassableTerrain.


Field Summary
static Serializer<FishPool> SERIALIZER
          Type serializer.
 
Method Summary
 void onEnter(Event event, Player player, Cell cell, Direction dir)
          Agent attempting to leave the from cell, heading toward the to cell.
 void onFrame(Context ctx, Cell cell, int frame)
          When off, the fish pool periodically tests to see if it should go "on".
 boolean randomSeed()
          Should this animation start with a randomly seeded number as its first frame? For some animations, this can prevent all presentations of the piece on the board executing the same animation frame at the same time.
 
Methods inherited from class us.asciiroth.client.terrain.AbstractTerrain
canEnter, canExit, onAdjacentTo, onAgentEnter, onAgentExit, onDrop, onExit, onFlyOver, onNotAdjacentTo, onPickup
 
Methods inherited from class us.asciiroth.client.core.AbstractPiece
getColor, getName, getSymbol, is, not
 
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, getSymbol, is, not
 

Field Detail

SERIALIZER

public static final Serializer<FishPool> SERIALIZER
Type serializer.

Method Detail

onEnter

public void onEnter(Event event,
                    Player player,
                    Cell cell,
                    Direction dir)
Description copied from interface: Terrain
Agent attempting to leave the from cell, heading toward the to cell. The terrain being used is the terrain of the to cell. The agent is still in the from
Specified by:
onEnter in interface Terrain
Overrides:
onEnter in class AbstractTerrain

onFrame

public void onFrame(Context ctx,
                    Cell cell,
                    int frame)
When off, the fish pool periodically tests to see if it should go "on". When on, after a period, it turns off and moves.

Specified by:
onFrame in interface Animated

randomSeed

public boolean randomSeed()
Description copied from interface: Animated
Should this animation start with a randomly seeded number as its first frame? For some animations, this can prevent all presentations of the piece on the board executing the same animation frame at the same time.

Specified by:
randomSeed in interface Animated
Returns:
true if a random frame should begin the animated piece's timeline

0.7

© 2009 Alx Dark