net.sf.colossus.game.actions
Class AddCreatureAction

java.lang.Object
  extended by net.sf.colossus.game.actions.LegionAction
      extended by net.sf.colossus.game.actions.AddCreatureAction
All Implemented Interfaces:
GameAction, RevealingAction
Direct Known Subclasses:
Acquisition, Recruitment, Summoning, SummonUndo

public class AddCreatureAction
extends LegionAction
implements RevealingAction

An event modelling the addition of a creature to a legion. This is meant to be used only as interface or through subclasses. TODO make abstract once History handles the subclasses properly


Field Summary
private  CreatureType creatureType
           
 
Fields inherited from class net.sf.colossus.game.actions.LegionAction
legion
 
Constructor Summary
AddCreatureAction(Legion legion, CreatureType creatureType)
           
 
Method Summary
 CreatureType getAddedCreatureType()
          The type of creature that was added.
 java.lang.String getReason()
          Returns a string representing the reason for the addition.
 CreatureType[] getRevealedCreatures()
           
 java.lang.String toString()
           
 
Methods inherited from class net.sf.colossus.game.actions.LegionAction
getLegion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

creatureType

private final CreatureType creatureType
Constructor Detail

AddCreatureAction

public AddCreatureAction(Legion legion,
                         CreatureType creatureType)
Method Detail

getAddedCreatureType

public CreatureType getAddedCreatureType()
The type of creature that was added.


getRevealedCreatures

public CreatureType[] getRevealedCreatures()
Specified by:
getRevealedCreatures in interface RevealingAction

getReason

public java.lang.String getReason()
Returns a string representing the reason for the addition. TODO remove in favour of using the event hierarchy TODO should be abstract here, but History still creates instances of this class


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object