Package com.deco2800.game.files
Class MPCConfig
java.lang.Object
com.deco2800.game.files.MPCConfig
public class MPCConfig
extends java.lang.Object
Class to record the MPC attire configuration into a JSON file that is locally persisted
 
Predefined player properties are loaded from a config stored as a json file and should have the properties stores in 'PlayerConfig'.
- 
Constructor Summary
Constructors Constructor Description MPCConfig() - 
Method Summary
Modifier and Type Method Description static PlayerConfiggetValues()Retrieve PlayerConfig values if they exist, else create a new PlayerConfigvoidreadValues()Store the current values into a JSON filestatic voidupdateAttire(java.lang.String attireType)Retrieve the current attire value and update PlayerConfigstatic voidupdateValues()Update the current attire value to OG in the JSON file when no attire has been selectedstatic voidupdateValues(PlayerConfig values)Write the current attire value into the JSON file 
- 
Constructor Details
- 
MPCConfig
public MPCConfig() 
 - 
 - 
Method Details
- 
readValues
public void readValues()Store the current values into a JSON file - 
updateAttire
public static void updateAttire(java.lang.String attireType)Retrieve the current attire value and update PlayerConfig - 
updateValues
Write the current attire value into the JSON file - 
updateValues
public static void updateValues()Update the current attire value to OG in the JSON file when no attire has been selected - 
getValues
Retrieve PlayerConfig values if they exist, else create a new PlayerConfig- Returns:
 - PlayerConfig
 
 
 -