Class ObjectiveManager

java.lang.Object
com.takenoko.engine.ObjectiveManager

public class ObjectiveManager extends Object
This class is used to manage the objectives of the bot.
  • Field Details

    • objectives

      private final List<Objective> objectives
    • achievedObjectives

      private final List<Objective> achievedObjectives
    • redeemedObjectives

      private final List<Objective> redeemedObjectives
  • Constructor Details

    • ObjectiveManager

      public ObjectiveManager()
    • ObjectiveManager

      public ObjectiveManager(ObjectiveManager objectiveManager)
  • Method Details

    • getObjectives

      public List<Objective> getObjectives()
      Get the current Objectives of the bot
      Returns:
      Objectives
    • getObjectiveScore

      public int getObjectiveScore()
      get the score of the achieved objectives
      Returns:
      the score of the achieved objectives
    • getRedeemedObjectives

      public List<Objective> getRedeemedObjectives()
      Get the list of the redeemed objectives
      Returns:
      the list of the redeemed objectives
    • getAchievedObjectives

      public List<Objective> getAchievedObjectives()
      get the list of achieved objectives
      Returns:
      the list of achieved objectives
    • verifyObjectives

      public void verifyObjectives(Board board, BotState botState)
      for each objective, check if it is achieved
      Parameters:
      board - the board
      botState - the bot manager
    • addObjective

      public void addObjective(Objective objective)
      Set the current Objective of the bot
      Parameters:
      objective - the objectives
    • updateObjectives

      public void updateObjectives(Board board, BotState botState)
      update the objectives
      Parameters:
      board - the board
      botState - the bot manager
    • setObjectiveNotAchieved

      public void setObjectiveNotAchieved(Objective objective)
      set an objective as not achieved
      Parameters:
      objective - the objective
    • setObjectiveAchieved

      public void setObjectiveAchieved(Objective objective)
      set an objective as achieved
      Parameters:
      objective - the objective
    • redeemObjective

      public void redeemObjective(Objective objective, BotState botState)
      redeem an objective
      Parameters:
      objective - the objective
    • getPandaObjectiveScore

      public int getPandaObjectiveScore()
      Returns the sum of the points of all the panda objectives
      Returns:
      the sum of the points of all the panda objectives
    • setStartingDeck

      public void setStartingDeck(List<Objective> objectives)
      Set the starting deck for a bot
      Parameters:
      objectives - list of objectives
    • copy

      public ObjectiveManager copy()
      Return a copy of the current ObjectiveManager
      Returns:
      ObjectiveManager
    • reset

      public void reset()
      Reset all the attributes of the ObjectiveManager
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getNotAchievedObjectives

      public List<Objective> getNotAchievedObjectives()