logic
Class SaveManager

java.lang.Object
  extended by logic.SaveManager

public class SaveManager
extends java.lang.Object

Author:
Tansel

Field Summary
private  java.io.ObjectInputStream inputStream
           
private  java.io.ObjectOutputStream outputStream
           
private  Save save
          Our Serializable Save ojbect.
private static java.lang.String SAVES_FILE
          Our definite save file.
 
Constructor Summary
SaveManager()
          Save Manager regulates the unlocked levels.
 
Method Summary
 void addSave(int level)
          Adds a new unlocked level.
 Save getSave()
           
 void loadFile()
          Loads Save file for processing.
 void updateFile()
          Updates the save file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

save

private Save save
Our Serializable Save ojbect.


SAVES_FILE

private static final java.lang.String SAVES_FILE
Our definite save file.

See Also:
Constant Field Values

outputStream

private java.io.ObjectOutputStream outputStream

inputStream

private java.io.ObjectInputStream inputStream
Constructor Detail

SaveManager

public SaveManager()
Save Manager regulates the unlocked levels. At first, only first level is available to play. When player unlocks new levels they become available to play when a new game is started.

Method Detail

getSave

public Save getSave()

addSave

public void addSave(int level)
Adds a new unlocked level.

Parameters:
level -

loadFile

public void loadFile()
Loads Save file for processing.


updateFile

public void updateFile()
Updates the save file.