Class Arsenal

java.lang.Object
com.csse3200.game.progression.arsenal.Arsenal

public class Arsenal extends Object
Arsenal class to manage the player's unlocked defences.
  • Constructor Details

    • Arsenal

      public Arsenal()
      Constructor for the Arsenal class.
  • Method Details

    • unlockDefence

      public void unlockDefence(String defenceKey)
      Adds a defence to the arsenal.
      Parameters:
      defenceKey - The key of the defence to add.
    • lockDefence

      public void lockDefence(String defenceKey)
      Removes a defence from the arsenal.
      Parameters:
      defenceKey - The key of the defence to remove.
    • getKeys

      public List<String> getKeys()
      Gets the list of defences in the arsenal.
      Returns:
      The list of keys of the defences in the arsenal.
    • contains

      public boolean contains(String defenceKey)
      Checks if the arsenal contains the specified defence key.
      Parameters:
      defenceKey - The key of the defence to check.
      Returns:
      True if the arsenal contains the defence key, false otherwise.