java.lang.Object
nz.ac.vuw.ecs.swen225.gp22.persistency.Save

public class Save extends Object
Used to save the current game. Using xml files.
Author:
Gideon
  • Constructor Details

    • Save

      public Save()
  • Method Details

    • saveGame

      public static void saveGame()
      Save current game as xml. Store information about the map, dimensions, number of treasures, nextLevel. Store time and keysCollected. Store player position, direction and inventory if present. Store tilemap.
    • saveInventory

      public static void saveInventory(org.dom4j.Element player)
      Save inventory to xml element.
      Parameters:
      player - Element to add the inventory to.
    • addPoint

      public static void addPoint(org.dom4j.Element element, Maze.Point p)
      Add an x and y as attributes to an xml element.
      Parameters:
      element - Element to add the attributes to.
      p - Point to get the x and y from.