org.vizzini.game.cardgame
Class AbstractCardTable

java.lang.Object
  extended by org.vizzini.game.AbstractEnvironment
      extended by org.vizzini.game.cardgame.AbstractCardTable
All Implemented Interfaces:
Serializable, Cloneable, IEnvironment
Direct Known Subclasses:
Environment

public abstract class AbstractCardTable
extends AbstractEnvironment

Provides a regular card deck for card games in the game framework.

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

Constructor Summary
AbstractCardTable()
           
 
Method Summary
 void configure(Properties properties)
          Configure this environment.
 ICardCollection getDiscardPile()
          Return the discard pile.
 ICardCollection getDrawPile()
          Return the draw pile.
 ISuit getSuit(String name)
          Return the suit with the given name.
protected  void performAction(DiscardAction action)
          Process a discard action.
protected  void performAction(DrawAction action)
          Process a draw action.
 void performAction(IAction action)
          Perform the given action.
protected  void performAction(TakeDiscardAction action)
          Process a take discard action.
 void reset()
          Reset this environment.
 void undoAction(IAction action)
          Undo the given action.
 
Methods inherited from class org.vizzini.game.AbstractEnvironment
addStateListener, clone, copy, createInitialTokens, equals, get, getAdjudicator, getAgentCollection, getStateManager, getTeamCollection, getTokenCollection, getTokenCollectionClass, getTurnNumber, hashCode, incrementTurnNumber, isFiringStateChanges, open, performActions, removeStateListener, setAdjudicator, setAgentCollection, setFiringStateChanges, setTokenCollectionClass, setTurnNumber, update
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCardTable

public AbstractCardTable()
Method Detail

configure

public void configure(Properties properties)
               throws InstantiationException,
                      IllegalAccessException
Configure this environment.

Specified by:
configure in interface IEnvironment
Overrides:
configure in class AbstractEnvironment
Parameters:
properties - Source of configuration information.
Throws:
InstantiationException
IllegalAccessException
Since:
v0.1

getDiscardPile

public ICardCollection getDiscardPile()
Return the discard pile.

Since:
v0.1

getDrawPile

public ICardCollection getDrawPile()
Return the draw pile.

Since:
v0.1

getSuit

public ISuit getSuit(String name)
Return the suit with the given name.

Since:
v0.1

performAction

public void performAction(IAction action)
Perform the given action.

Parameters:
action - Action.
Since:
v0.1

reset

public void reset()
Reset this environment.

Specified by:
reset in interface IEnvironment
Overrides:
reset in class AbstractEnvironment
Since:
v0.1

undoAction

public void undoAction(IAction action)
Undo the given action.

Parameters:
action - Action.
Since:
v0.1

performAction

protected void performAction(DiscardAction action)
Process a discard action.

Since:
v0.1

performAction

protected void performAction(DrawAction action)
Process a draw action.

Since:
v0.1

performAction

protected void performAction(TakeDiscardAction action)
Process a take discard action.

Since:
v0.1


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02