Coverage Summary for Class: Quest (com.mygdx.game.Quests)

Class Class, % Method, % Line, %
Quest 100% (1/1) 100% (5/5) 100% (9/9)


1 package com.mygdx.game.Quests; 2  3 import com.mygdx.game.Entitys.Player; 4  5 /** 6  * Base class for all quests facilitates the checking of completion 7  */ 8 public abstract class Quest { 9  protected String name; 10  protected String description; 11  protected int reward; 12  protected boolean isCompleted; 13  14  public Quest() { 15  name = ""; 16  description = ""; 17  reward = 0; 18  isCompleted = false; 19  } 20  21  /** 22  * Checks if the given player has met the complete condition 23  * 24  * @param p the player 25  * @return has completed 26  */ 27  public abstract boolean checkCompleted(Player p); 28  29  public int getReward() { 30  return reward; 31  } 32  33  public boolean isCompleted() { 34  return isCompleted; 35  } 36  37  38  public String getName() { 39  return name; 40  } 41  42  public String getDescription() { 43  return description; 44  } 45 }