Class SpawnRecipeCommands

java.lang.Object
com.csse3200.game.ui.terminal.commands.SpawnRecipeCommands
All Implemented Interfaces:
Command

public class SpawnRecipeCommands extends Object implements Command
A command for spawning recipes into the players inventory.
  • Constructor Details

    • SpawnRecipeCommands

      public SpawnRecipeCommands()
  • Method Details

    • action

      public boolean action(ArrayList<String> args)
      Processes the 'spawn' command and spawns the specified meal if the argument is valid. If the player's inventory is not empty, the current item is removed before adding the new one.
      Specified by:
      action in interface Command
      Parameters:
      args - List of command arguments (expects 1 argument specifying the recipe name)
      Returns:
      true if the command executed successfully, false otherwise