talx.model
Class GameState
java.lang.Object
talx.model.GameState
- All Implemented Interfaces:
- java.io.Serializable
- public class GameState
- extends java.lang.Object
- implements java.io.Serializable
Holds the state of a Game.
Although game classes can hold some types of state, the game state
object holds all of the volatile state information about game play.
That is, the game objects may hold information that must be supplied
to the view constructors, but all subsequent information about view
updates should come from the key/value pairs held in a game state
object.
- See Also:
- Serialized Form
|
Method Summary |
java.io.Serializable |
get(java.lang.String key)
This method returns the value associated with the key provided. |
GameState |
put(java.lang.String key,
java.io.Serializable value)
This method adds a new key/value pair to this GameState object. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
components
protected StringValueMap components
get
public java.io.Serializable get(java.lang.String key)
- This method returns the value associated with the key provided.
- Parameters:
key - the key of the value to return.
put
public GameState put(java.lang.String key,
java.io.Serializable value)
- This method adds a new key/value pair to this GameState object.
- Parameters:
key - the key of the value to be added.value - the Serializable component to add.
toString
public java.lang.String toString()
© 2001-2005 University of Oregon.
Eugene OR 97403, U.S.A. All Rights Reserved.