Class Arsenal
java.lang.Object
com.csse3200.game.progression.arsenal.Arsenal
Arsenal class to manage the player's unlocked defences.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if the arsenal contains the specified defence key.getKeys()
Gets the list of defences in the arsenal.void
lockDefence
(String defenceKey) Removes a defence from the arsenal.void
unlockDefence
(String defenceKey) Adds a defence to the arsenal.
-
Constructor Details
-
Arsenal
public Arsenal()Constructor for the Arsenal class.
-
-
Method Details
-
unlockDefence
Adds a defence to the arsenal.- Parameters:
defenceKey
- The key of the defence to add.
-
lockDefence
Removes a defence from the arsenal.- Parameters:
defenceKey
- The key of the defence to remove.
-
getKeys
Gets the list of defences in the arsenal.- Returns:
- The list of keys of the defences in the arsenal.
-
contains
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.
-