|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IAction
Defines methods required by actions in the game framework. A action instance encapsulates the information necessary for the environment to process the action. Examples are moving a chess piece, moving a paddle to hit a ball, or playing a card.
This class participates in the Command pattern as described in Patterns In Java Volume 1, Mark Grand, 1998.
| Method Summary | |
|---|---|
void |
clear()
Clear the properties of this object. |
boolean |
doIt()
Perform the command encapsulated by this object. |
boolean |
equals(Object object)
Return true if the given object is equal to this. |
IAgent |
getAgent()
Return the agent who originated this action. |
int |
getRating()
Return the rating of this action. |
int |
hashCode()
Returns a hash code value for the object. |
String |
prettyPrint()
Provide a nicely formatted string representation of this object. |
void |
release()
Return this instance to the reusable object pool, if one is used. |
void |
setAgent(IAgent agent)
Set the agent who originated this action. |
void |
setRating(int rating)
Set the rating of this action. |
boolean |
undoIt()
Undo the last invocation of doIt. |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Method Detail |
|---|
void clear()
boolean doIt()
boolean equals(Object object)
equals in class Objectobject - The object to compare.IAgent getAgent()
int getRating()
int hashCode()
hashCode in class ObjectString prettyPrint()
void release()
void setAgent(IAgent agent)
agent - The agent who originated this action.void setRating(int rating)
boolean undoIt()
|
||||||||||
| 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 |