Package com.csse3200.game.services
Class SaveLoadService
java.lang.Object
com.csse3200.game.services.SaveLoadService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
load()
void
Load function which based on contents in saveFile.json Makes the game state match saveFile.jsonvoid
save()
void
Saves the current state of the game into a GameStateboolean
Check to see if there is a valid save file stored if not return falseboolean
validSaveFile
(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
-