Class QuestManager


  • public class QuestManager
    extends java.lang.Object
    Creates the quests and manages their completion and order
    • Constructor Summary

      Constructors 
      Constructor Description
      QuestManager()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addQuest​(Quest q)  
      static boolean anyQuests()
      Are there any quests
      static void checkCompleted()
      Checks quests for completion and gives rewards, teleports the chest when appropriate.
      static void createRandomQuests()
      Creates the quest line with the final quest being to kill a college Changed from private to public in assessment 2 to allow the separation between initialize and creating quests for testing.
      static Quest currentQuest()
      Returns the next un-completed quest
      static void Initialize()  
      static void setCurrentQuest​(java.lang.String current)
      added for assessment 2 sets the current quest to the one that corresponds to a given name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QuestManager

        public QuestManager()
    • Method Detail

      • Initialize

        public static void Initialize()
      • createRandomQuests

        public static void createRandomQuests()
        Creates the quest line with the final quest being to kill a college Changed from private to public in assessment 2 to allow the separation between initialize and creating quests for testing.
      • addQuest

        public static void addQuest​(Quest q)
      • checkCompleted

        public static void checkCompleted()
        Checks quests for completion and gives rewards, teleports the chest when appropriate. Stops checking the quest after the first no completed quest (prevents quests being completed in any order)
      • currentQuest

        public static Quest currentQuest()
        Returns the next un-completed quest
        Returns:
        the quest null if no un-completed quests found
      • setCurrentQuest

        public static void setCurrentQuest​(java.lang.String current)
        added for assessment 2 sets the current quest to the one that corresponds to a given name.
        Parameters:
        current - string containing the name of the quest to be set as current
      • anyQuests

        public static boolean anyQuests()
        Are there any quests
        Returns:
        true if any non completed quest exits