Package com.takenoko.engine
Class ObjectiveManager
java.lang.Object
com.takenoko.engine.ObjectiveManager
This class is used to manage the objectives of the bot.
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addObjective
(Objective objective) Set the current Objective of the botcopy()
Return a copy of the current ObjectiveManagerboolean
get the list of achieved objectivesGet the current Objectives of the botint
get the score of the achieved objectivesint
Returns the sum of the points of all the panda objectivesGet the list of the redeemed objectivesint
hashCode()
void
redeemObjective
(Objective objective, BotState botState) redeem an objectivevoid
reset()
Reset all the attributes of the ObjectiveManagervoid
setObjectiveAchieved
(Objective objective) set an objective as achievedvoid
setObjectiveNotAchieved
(Objective objective) set an objective as not achievedvoid
setStartingDeck
(List<Objective> objectives) Set the starting deck for a botvoid
updateObjectives
(Board board, BotState botState) update the objectivesvoid
verifyObjectives
(Board board, BotState botState) for each objective, check if it is achieved
-
Field Details
-
objectives
-
achievedObjectives
-
redeemedObjectives
-
-
Constructor Details
-
ObjectiveManager
public ObjectiveManager() -
ObjectiveManager
-
-
Method Details
-
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
Get the list of the redeemed objectives- Returns:
- the list of the redeemed objectives
-
getAchievedObjectives
get the list of achieved objectives- Returns:
- the list of achieved objectives
-
verifyObjectives
for each objective, check if it is achieved- Parameters:
board
- the boardbotState
- the bot manager
-
addObjective
Set the current Objective of the bot- Parameters:
objective
- the objectives
-
updateObjectives
update the objectives- Parameters:
board
- the boardbotState
- the bot manager
-
setObjectiveNotAchieved
set an objective as not achieved- Parameters:
objective
- the objective
-
setObjectiveAchieved
set an objective as achieved- Parameters:
objective
- the objective
-
redeemObjective
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
Set the starting deck for a bot- Parameters:
objectives
- list of objectives
-
copy
Return a copy of the current ObjectiveManager- Returns:
- ObjectiveManager
-
reset
public void reset()Reset all the attributes of the ObjectiveManager -
equals
-
hashCode
public int hashCode() -
getNotAchievedObjectives
-