org.vizzini.game.boardgame.action
Class BoardGameActionFactory

java.lang.Object
  extended by org.vizzini.game.boardgame.action.BoardGameActionFactory

public class BoardGameActionFactory
extends Object

Provides a factory for game actions.

Since:
v0.2
Version:
v0.3
Author:
Jeffrey M. Thompson

Constructor Summary
protected BoardGameActionFactory()
          Construct this object.
 
Method Summary
 IGridBoardAction getAction(IGridBoard gridBoard, IAgent agent, IntegerPosition position)
          Return an action appropriate for the given parameters.
 IGridBoardAction getAction(IGridBoard gridBoard, IAgent agent, IntegerPosition position, Class tokenClass)
          Return an action appropriate for the given parameters.
 IGridBoardAction getAction(IGridBoard gridBoard, IAgent agent, IntegerPosition fromPosition, IntegerPosition toPosition)
          Return an action appropriate for the given parameters.
static BoardGameActionFactory getInstance()
          Return the singleton instance.
 RedoAction getRedoAction(IAgent agent)
          Return an RedoAction for the given parameters.
 UndoAction getUndoAction(IAgent agent)
          Return an UndoAction for the given parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoardGameActionFactory

protected BoardGameActionFactory()
Construct this object. This method is protected as part of the Singleton pattern.

Since:
v0.2
Method Detail

getInstance

public static BoardGameActionFactory getInstance()
Return the singleton instance.

Since:
v0.2

getAction

public IGridBoardAction getAction(IGridBoard gridBoard,
                                  IAgent agent,
                                  IntegerPosition position)
Return an action appropriate for the given parameters.

Since:
v0.2

getAction

public IGridBoardAction getAction(IGridBoard gridBoard,
                                  IAgent agent,
                                  IntegerPosition fromPosition,
                                  IntegerPosition toPosition)
Return an action appropriate for the given parameters.

Since:
v0.2

getAction

public IGridBoardAction getAction(IGridBoard gridBoard,
                                  IAgent agent,
                                  IntegerPosition position,
                                  Class tokenClass)
Return an action appropriate for the given parameters.

Since:
v0.2

getRedoAction

public RedoAction getRedoAction(IAgent agent)
Return an RedoAction for the given parameters.

Since:
v0.2

getUndoAction

public UndoAction getUndoAction(IAgent agent)
Return an UndoAction for the given parameters.

Since:
v0.2


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02