org.vizzini.game.cardgame
Class DiscardAction

java.lang.Object
  extended by org.vizzini.game.action.AbstractAction
      extended by org.vizzini.game.cardgame.DiscardAction
All Implemented Interfaces:
Serializable, Comparable, IAction

public class DiscardAction
extends AbstractAction

Provides a discard action for card games in the game framework.

Since:
v0.1
Version:
v0.2
Author:
Jeffrey M. Thompson
See Also:
Serialized Form

Constructor Summary
DiscardAction()
           
 
Method Summary
 boolean doIt()
          Perform the command encapsulated by this object.
 ICard getCard()
          Return the card.
 void setCard(ICard card)
          Set the card.
 String toString()
          Return a string representation of this object.
 boolean undoIt()
          Undo the last invocation of doIt.
 
Methods inherited from class org.vizzini.game.action.AbstractAction
clear, compareTo, equals, getAgent, getRating, hashCode, prettyPrint, release, setAgent, setRating
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DiscardAction

public DiscardAction()
Method Detail

doIt

public boolean doIt()
Description copied from class: AbstractAction
Perform the command encapsulated by this object. This method does nothing, and returns false.

Specified by:
doIt in interface IAction
Overrides:
doIt in class AbstractAction
Returns:
true if successful and can be undone.

getCard

public ICard getCard()
Return the card.

Since:
v0.1

setCard

public void setCard(ICard card)
Set the card.

Since:
v0.1

toString

public String toString()
Return a string representation of this object.

Overrides:
toString in class AbstractAction
Since:
v0.1

undoIt

public boolean undoIt()
Description copied from class: AbstractAction
Undo the last invocation of doIt. This method does nothing, and returns false.

Specified by:
undoIt in interface IAction
Overrides:
undoIt in class AbstractAction
Returns:
true if the undo was successful.


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02