|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vizzini.util.AbstractDocument
org.vizzini.game.AbstractGameState
public abstract class AbstractGameState
Provides base functionality for game states in the game framework. A game state stores all the data necessary to reproduce a particular game state.
Constructor Summary | |
---|---|
AbstractGameState()
Construct this object. |
|
AbstractGameState(Object owner)
Construct this object. |
Method Summary | |
---|---|
protected void |
copy(IGameState gameState)
Copy the given game state into this. |
boolean |
equals(Object object)
Return true if the given object is equal to this. |
IAgentCollection |
getAgentCollection()
Return the agent collection. |
String |
getGameIdentifier()
Return the game identifier. |
ITokenCollection |
getTokenCollection()
Return the token collection. |
long |
getTurnNumber()
Return the turn number. |
int |
hashCode()
Returns a hash code value for the object. |
void |
open()
Open the associated file, thereby populating the document. |
void |
setAgentCollection(IAgentCollection agentCollection)
Set the agent collection. |
void |
setGameIdentifier(String gameIdentifier)
Set the game identifier. |
void |
setTokenCollection(ITokenCollection tokenCollection)
Set the token collection. |
void |
setTurnNumber(long turnNumber)
Set the turn number. |
String |
toString()
Return a string representation of this object. |
Methods inherited from class org.vizzini.util.AbstractDocument |
---|
addDirtyListener, addFileListener, getDocument, getDocumentSupport, getFile, isDirty, isFileAssociated, isSaveable, removeDirtyListener, removeFileListener, reset, save, saveAs, setDirty, setDocument, setFile |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.vizzini.util.IDocument |
---|
addDirtyListener, addFileListener, getFile, isDirty, isFileAssociated, isSaveable, removeDirtyListener, removeFileListener, reset, save, saveAs, setDirty, setFile |
Constructor Detail |
---|
public AbstractGameState()
public AbstractGameState(Object owner)
Method Detail |
---|
public void setAgentCollection(IAgentCollection agentCollection)
setAgentCollection
in interface IGameState
public IAgentCollection getAgentCollection()
getAgentCollection
in interface IGameState
public void setGameIdentifier(String gameIdentifier)
setGameIdentifier
in interface IGameState
public String getGameIdentifier()
getGameIdentifier
in interface IGameState
public void setTokenCollection(ITokenCollection tokenCollection)
setTokenCollection
in interface IGameState
public ITokenCollection getTokenCollection()
getTokenCollection
in interface IGameState
public void setTurnNumber(long turnNumber)
setTurnNumber
in interface IGameState
public long getTurnNumber()
getTurnNumber
in interface IGameState
public boolean equals(Object object)
equals
in class Object
object
- The object to compare.public int hashCode()
hashCode
in class Object
public void open() throws FileNotFoundException, IOException, ClassNotFoundException
open
in interface IDocument
open
in class AbstractDocument
FileNotFoundException
IOException
ClassNotFoundException
public String toString()
toString
in class Object
protected void copy(IGameState gameState)
|
||||||||||
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 |