Package com.csse3200.game.services
Class SaveLoadService
java.lang.Object
com.csse3200.game.services.SaveLoadService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidload()voidLoad function which based on contents in saveFile.json Makes the game state match saveFile.jsonvoidsave()voidSaves the current state of the game into a GameStatebooleanCheck to see if there is a valid save file stored if not return falsebooleanvalidSaveFile(String path)
-
Constructor Details
-
SaveLoadService
public SaveLoadService()
-
-
Method Details
-
save
Saves the current state of the game into a GameState -
save
public void save() -
load
Load function which based on contents in saveFile.json Makes the game state match saveFile.json -
load
public void load() -
validSaveFile
public boolean validSaveFile()Check to see if there is a valid save file stored if not return false- Returns:
- true if there exists a valid save file, false otherwise
-
validSaveFile
-