|
||||||||||
| 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
public abstract class AbstractGridBoardAction
Provides base functionality for grid board actions in the game framework. A grid board action instance encapsulates the information necessary for the environment to process the action. Examples are moving a chess piece, placing a token, or capturing a token.
This class participates in the Command pattern as described in Patterns In Java Volume 1, Mark Grand, 1998.
| Constructor Summary | |
|---|---|
AbstractGridBoardAction(IGridBoard gridBoard,
IAgent agent)
Construct this object. |
|
| Method Summary | |
|---|---|
void |
clear()
Clear the properties of this object. |
boolean |
equals(Object object)
Return true if the given object is equal to this. |
IGridBoard |
getGridBoard()
Return the gridBoard. |
IntegerPosition |
getToPosition()
|
int |
hashCode()
Returns a hash code value for the object. |
String |
prettyPrint()
Provide a nicely formatted string representation of this object. |
protected void |
setGridBoard(IGridBoard gridBoard)
Set the GridBoard. |
protected void |
setToPosition(IntegerPosition position)
Set the to position. |
| Methods inherited from class org.vizzini.game.action.AbstractAction |
|---|
compareTo, doIt, getAgent, getRating, release, setAgent, setRating, toString, undoIt |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.vizzini.game.action.IAction |
|---|
doIt, getAgent, getRating, release, setAgent, setRating, undoIt |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Constructor Detail |
|---|
public AbstractGridBoardAction(IGridBoard gridBoard,
IAgent agent)
| Method Detail |
|---|
public void clear()
clear in interface IActionclear in class AbstractActionpublic boolean equals(Object object)
equals in interface IActionequals in class AbstractActionobject - The object to compare.public IGridBoard getGridBoard()
IGridBoardAction
getGridBoard in interface IGridBoardActionpublic IntegerPosition getToPosition()
getToPosition in interface IGridBoardActionpublic int hashCode()
hashCode in interface IActionhashCode in class AbstractActionpublic String prettyPrint()
prettyPrint in interface IActionprettyPrint in class AbstractActionprotected void setGridBoard(IGridBoard gridBoard)
protected void setToPosition(IntegerPosition position)
|
||||||||||
| 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 |