jfreerails.network
Class SavedGamesManager4UnitTests

java.lang.Object
  extended by jfreerails.network.SavedGamesManager4UnitTests
All Implemented Interfaces:
SavedGamesManager

public class SavedGamesManager4UnitTests
extends java.lang.Object
implements SavedGamesManager

Stores saved games in memory rather than on disk.

Author:
Luke

Field Summary
private  java.lang.String[] mapsAvailable
           
private  java.util.HashMap<java.lang.String,java.io.Serializable> savedGames
           
 
Constructor Summary
SavedGamesManager4UnitTests()
           
 
Method Summary
 java.lang.String[] getNewMapNames()
           
 java.lang.String[] getSaveGameNames()
           
 java.io.Serializable loadGame(java.lang.String name)
           
 java.io.Serializable newMap(java.lang.String name)
           
 void saveGame(java.io.Serializable w, java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapsAvailable

private java.lang.String[] mapsAvailable

savedGames

private final java.util.HashMap<java.lang.String,java.io.Serializable> savedGames
Constructor Detail

SavedGamesManager4UnitTests

public SavedGamesManager4UnitTests()
Method Detail

getSaveGameNames

public java.lang.String[] getSaveGameNames()
Specified by:
getSaveGameNames in interface SavedGamesManager

getNewMapNames

public java.lang.String[] getNewMapNames()
Specified by:
getNewMapNames in interface SavedGamesManager

saveGame

public void saveGame(java.io.Serializable w,
                     java.lang.String name)
              throws java.io.IOException
Specified by:
saveGame in interface SavedGamesManager
Throws:
java.io.IOException

loadGame

public java.io.Serializable loadGame(java.lang.String name)
                              throws java.io.IOException
Specified by:
loadGame in interface SavedGamesManager
Throws:
java.io.IOException

newMap

public java.io.Serializable newMap(java.lang.String name)
                            throws java.io.IOException
Specified by:
newMap in interface SavedGamesManager
Throws:
java.io.IOException