Class GameState

java.lang.Object
com.csse3200.game.gamestate.GameState

public class GameState extends Object
A data struct that contains other data structs to be saved to JSONs by SaveHandler. Fields MUST be static. Not to be kept between playthroughs.
  • Field Details

  • Method Details

    • resetState

      public static void resetState()
      Clears the contents of the GameState and replaces them with the default saves.
    • checkState

      public static boolean checkState()
      Checks whether GameState correctly loaded.
      Returns:
      a boolean to indicate whether GameState was correctly loaded. Returns true if the load failed, and false otherwise.
    • clearState

      public static void clearState()
      Clears all the GameState contents and resets them to their empty state.