java.lang.Object
com.csse3200.game.components.quests.Task

public class Task extends Object
Handles the tasks for each quest
  • Constructor Details

    • Task

      public Task(String taskName, String description, String hint, int requiredTriggers, int triggerCount, boolean completed, boolean failed)
      Constructs a new Task with specific details.
      Parameters:
      taskName - The name of the task.
      description - A description of what the task involves.
      hint - A hint related to completing the task.
      requiredTriggers - The number of triggers required to complete task.
  • Method Details

    • getTaskName

      public String getTaskName()
      Returns the task name.
    • getDescription

      public String getDescription()
      Returns the description for tasks.
    • getHint

      public String getHint()
      Returns the hint for tasks.
    • isCompleted

      public boolean isCompleted()
      Checks if quest is completed.
    • getTriggerCount

      public int getTriggerCount()
      Returns how many times task is triggered.
    • getRequiredTriggers

      public int getRequiredTriggers()
      Returns the number of triggers required to complete this task.
    • isFailed

      public boolean isFailed()
      Checks if task is failed.
    • failTask

      public void failTask()
      Marks the task as failed.
    • handleEvent

      public void handleEvent()
      Handles an event related to the task.