Class Quest

java.lang.Object
com.mygdx.game.Quests.Quest
Direct Known Subclasses:
KillQuest, LocateQuest

public abstract class Quest
extends java.lang.Object
Base class for all quests facilitates the checking of completion
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected java.lang.String description  
    protected boolean isCompleted  
    protected java.lang.String name  
    protected int reward  
  • Constructor Summary

    Constructors
    Constructor Description
    Quest()  
  • Method Summary

    Modifier and Type Method Description
    abstract boolean checkCompleted​(Player p)
    Checks if the given player has met the complete condition
    java.lang.String getDescription()  
    java.lang.String getName()  
    int getReward()  
    boolean isCompleted()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • name

      protected java.lang.String name
    • description

      protected java.lang.String description
    • reward

      protected int reward
    • isCompleted

      protected boolean isCompleted
  • Constructor Details

    • Quest

      public Quest()
  • Method Details

    • checkCompleted

      public abstract boolean checkCompleted​(Player p)
      Checks if the given player has met the complete condition
      Parameters:
      p - the player
      Returns:
      has completed
    • getReward

      public int getReward()
    • isCompleted

      public boolean isCompleted()
    • getName

      public java.lang.String getName()
    • getDescription

      public java.lang.String getDescription()