| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.vizzini.game.action.AbstractAction
org.vizzini.game.boardgame.action.AbstractGridBoardAction
org.vizzini.game.boardgame.action.AbstractMoveAction
org.vizzini.game.boardgame.action.MoveCaptureAction
public class MoveCaptureAction
Provides an action for movement of a token from a position to another, occupied position. The token at the 'to' position is captured or removed.
| Constructor Summary | |
|---|---|
| protected  | MoveCaptureAction(IGridBoard gridBoard,
                  IAgent agent,
                  IntegerPosition fromPosition,
                  IntegerPosition toPosition)Construct this object. | 
| Method Summary | |
|---|---|
|  int | compareTo(Object object)Compare this to the given object. | 
|  boolean | doIt()Perform the command encapsulated by this object. | 
|  boolean | equals(Object object)Return true if the given object is equal to this. | 
| static MoveCaptureAction | get(IGridBoard gridBoard,
    IAgent agent,
    IntegerPosition fromPosition,
    IntegerPosition toPosition)Return an instance of this class using the given parameters. | 
|  IntegerPosition | getFromPosition() | 
|  IntegerPosition | getToPosition() | 
|  int | hashCode()Returns a hash code value for the object. | 
| static void | poolReport()Log a statistics report. | 
|  void | release()Return this instance to the reusable object pool. | 
| protected  void | set(IGridBoard gridBoard,
    IAgent agent,
    IntegerPosition fromPosition,
    IntegerPosition toPosition)Set parameters on this object. | 
|  String | toString()Return a string representation of this object. | 
|  boolean | undoIt()Undo the last invocation of doIt. | 
| Methods inherited from class org.vizzini.game.boardgame.action.AbstractMoveAction | 
|---|
| clear, prettyPrint, setFromPosition | 
| Methods inherited from class org.vizzini.game.boardgame.action.AbstractGridBoardAction | 
|---|
| getGridBoard, setGridBoard, setToPosition | 
| Methods inherited from class org.vizzini.game.action.AbstractAction | 
|---|
| getAgent, getRating, setAgent, setRating | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface org.vizzini.game.boardgame.action.IGridBoardAction | 
|---|
| getGridBoard | 
| Methods inherited from interface org.vizzini.game.action.IAction | 
|---|
| getAgent, getRating, setAgent, setRating | 
| Constructor Detail | 
|---|
protected MoveCaptureAction(IGridBoard gridBoard,
                            IAgent agent,
                            IntegerPosition fromPosition,
                            IntegerPosition toPosition)
| Method Detail | 
|---|
public static MoveCaptureAction get(IGridBoard gridBoard,
                                    IAgent agent,
                                    IntegerPosition fromPosition,
                                    IntegerPosition toPosition)
public static void poolReport()
public int compareTo(Object object)
compareTo in interface ComparablecompareTo in class AbstractMoveActionClassCastException - if another is not an instance of 
                              AbstractAction.public boolean doIt()
doIt in interface IActiondoIt in class AbstractActionpublic boolean equals(Object object)
equals in interface IActionequals in class AbstractMoveActionobject - The object to compare.public IntegerPosition getFromPosition()
getFromPosition in interface IMoveActiongetFromPosition in class AbstractMoveActionpublic IntegerPosition getToPosition()
getToPosition in interface IGridBoardActiongetToPosition in class AbstractGridBoardActionpublic int hashCode()
hashCode in interface IActionhashCode in class AbstractMoveActionpublic void release()
release in interface IActionrelease in class AbstractActionpublic String toString()
toString in class AbstractActionpublic boolean undoIt()
undoIt in interface IActionundoIt in class AbstractAction
protected void set(IGridBoard gridBoard,
                   IAgent agent,
                   IntegerPosition fromPosition,
                   IntegerPosition toPosition)
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |