us.asciiroth.client.terrain.decorators
Class WinGame

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.WinGame
All Implemented Interfaces:
ColorListener, Piece, Terrain, TerrainProxy

public class WinGame
extends Decorator

When this piece receives a color event, the player wins the game. Used in combination with triggers to end the game when a certain condition is reached. The url should reference an HTML document to describe the end of the game, relative to the folder of the current scenario.


Field Summary
static Serializer<WinGame> SERIALIZER
          Type serializer.
 
Constructor Summary
WinGame(Terrain terrain, Color color, java.lang.String url)
          Constructor.
 
Method Summary
 void onColorEventInternal(Context ctx, Cell cell, Cell origin)
          Override this method in subclasses in order to augment the onTrigger behavior of the decorated terrain.
 Terrain proxy(Terrain terrain)
           
 
Methods inherited from class us.asciiroth.client.terrain.decorators.Decorator
canEnter, canExit, getProxiedTerrain, is, not, onAdjacentTo, onAgentEnter, onAgentExit, onColorEvent, onDrop, onEnter, onExit, onFlyOver, onNotAdjacentTo, onPickup
 
Methods inherited from class us.asciiroth.client.core.AbstractPiece
getColor, getName, getSymbol
 
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
 

Field Detail

SERIALIZER

public static final Serializer<WinGame> SERIALIZER
Type serializer.

Constructor Detail

WinGame

public WinGame(Terrain terrain,
               Color color,
               java.lang.String url)
Constructor.

Parameters:
terrain -
color -
url -
Method Detail

onColorEventInternal

public void onColorEventInternal(Context ctx,
                                 Cell cell,
                                 Cell origin)
Description copied from class: Decorator
Override this method in subclasses in order to augment the onTrigger behavior of the decorated terrain.


proxy

public Terrain proxy(Terrain terrain)
Returns:
a new proxy, with the same behavior but wrapping a different terrain

0.7

2009 Alx Dark