Class SaveStringJSON
java.lang.Object
org.progettoedids.util.savestrings.SaveStringJSON
- All Implemented Interfaces:
SaveStringProducer,SaveStringReader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetLabyrinthName(String saveString) Returns the name of the Labyrinth as codified in the save string.longgetRandomNumberGeneratorSeed(String saveString) Returns the RNG seed of the Labyrinth as codified in the save string.String[]getUserCommands(String saveString) Returns an array of user commands as codified in the save string.produceSaveString(CommandLogger commandLogger, Labyrinth labyrinth) Produces a String containing the required save data in a certain format, as chosen by the implementer.
-
Constructor Details
-
SaveStringJSON
public SaveStringJSON()
-
-
Method Details
-
produceSaveString
Description copied from interface:SaveStringProducerProduces a String containing the required save data in a certain format, as chosen by the implementer.- Specified by:
produceSaveStringin interfaceSaveStringProducer- Parameters:
commandLogger- The CommandLogger whose logged commands are to be saved. Must not be nulllabyrinth- The Labyrith whose parameters are to be saved. Must not be null- Returns:
- a String, which is the save string formatted according to a certain format
-
getLabyrinthName
Description copied from interface:SaveStringReaderReturns the name of the Labyrinth as codified in the save string.- Specified by:
getLabyrinthNamein interfaceSaveStringReader- Parameters:
saveString- A save string in a certain format. Must not be null- Returns:
- a String
-
getRandomNumberGeneratorSeed
Description copied from interface:SaveStringReaderReturns the RNG seed of the Labyrinth as codified in the save string.- Specified by:
getRandomNumberGeneratorSeedin interfaceSaveStringReader- Parameters:
saveString- A save string in a certain format. Must not be null- Returns:
- a long integer
-
getUserCommands
Description copied from interface:SaveStringReaderReturns an array of user commands as codified in the save string.- Specified by:
getUserCommandsin interfaceSaveStringReader- Parameters:
saveString- A save string in a certain format. Must not be null- Returns:
- an array of String(s)
-