model.filehandling
Class FileManager

java.lang.Object
  extended by model.filehandling.FileManager

public class FileManager
extends java.lang.Object

Responsible for saving and loading the files in the TuringBattle system

Author:
nadim

Constructor Summary
FileManager(java.lang.String path)
          Specifies the file path (directory to store files in)
 
Method Summary
 TuringMap loadMap(java.lang.String mapName)
          Loads a Map from file
 TuringState[] loadStates()
          Loads the TuringStates from file
 boolean saveStates(TuringState[] states)
          Saves the states out to file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileManager

public FileManager(java.lang.String path)
Specifies the file path (directory to store files in)

Parameters:
path -
Method Detail

saveStates

public boolean saveStates(TuringState[] states)
Saves the states out to file

Parameters:
states -
Returns:

loadStates

public TuringState[] loadStates()
                         throws java.lang.Exception
Loads the TuringStates from file

Returns:
Throws:
java.lang.Exception

loadMap

public TuringMap loadMap(java.lang.String mapName)
                  throws java.lang.Exception
Loads a Map from file

Returns:
Throws:
java.lang.Exception