|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvooga.replay.core.VoogaSave
public class VoogaSave
VoogaSave is responsible for saving information about the game such as the game state and user actions. A VoogaSave should be constructed for every game being played and resumed.
Constructor Summary | |
---|---|
VoogaSave(java.lang.String user,
java.lang.String gameName)
Constructor for when the game is first played. |
Method Summary | |
---|---|
void |
addReplayPoint()
Adds a replay point to the map |
long |
getCurrentTime()
Gets the latest time that the game was running |
java.lang.String |
getGameName()
Gets the game name |
java.util.TreeMap<java.lang.Long,java.lang.String> |
getReplayPointsMap()
Gets a map containing the replay points. |
java.lang.String |
getUniqueGameName()
|
java.lang.String |
getUser()
Gets the user |
java.util.Collection<UserAction> |
getUserActions()
Gets the saved user actions |
void |
saveReplayObject(java.lang.Object replayObject,
long time,
boolean isFromNetwork)
This method stores the information necessary to replay the game. |
void |
saveReplayPoint(long time)
This method is called whenever the user hits the button to mark a convenient replay point. |
void |
saveTime(long inputTime)
This method is called by the Game Engine group so that we have the current game time every game loop iteration. |
void |
serialize()
This method serializes the maps and the list of games to resume. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VoogaSave(java.lang.String user, java.lang.String gameName)
users
- Method Detail |
---|
public void saveReplayObject(java.lang.Object replayObject, long time, boolean isFromNetwork)
object
- to savepublic void saveTime(long inputTime)
inputTime
- This parameter is the current game time passed from the game.F
enginepublic void saveReplayPoint(long time)
gameState
- time
- public void serialize()
gameState
- fileName
- public java.util.Collection<UserAction> getUserActions()
public java.util.TreeMap<java.lang.Long,java.lang.String> getReplayPointsMap()
public void addReplayPoint()
time
- public long getCurrentTime()
public java.lang.String getUser()
public java.lang.String getGameName()
public java.lang.String getUniqueGameName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |