Package com.takenoko.bot.unitary
Class SmartPlaceIrrigation
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<Action,Double>
com.takenoko.bot.PriorityBot
com.takenoko.bot.unitary.SmartPlaceIrrigation
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
FieldsFields inherited from class com.takenoko.bot.PriorityBot
DEFAULT_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
allPatternObjectivesAreCompleted
(BotState botState) Check if any of the pattern objectives are completedvoid
analyzeIrrigationToPlaceToCompletePatternObjective
(Board board, BotState botState) This method will add the edge position to the irrigationToPlace list so that the bot knows that he has to place them in order to complete is pattern objectivboolean
protected void
fillAction
(Board board, BotState botState, History history) getCandidateShapes
(Board board, BotState botState) Get all the shape matching the patterns on the current pattern objectivesgetCurrentPatternObjectives
(BotState botState) int
hashCode()
Methods inherited from class com.takenoko.bot.PriorityBot
add, addActionWithPriority, addWithAffine, addWithLinear, addWithOffset, addWithSquash, chooseAction, compute
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
toString
-
Field Details
-
irrigationToPlace
-
-
Constructor Details
-
SmartPlaceIrrigation
public SmartPlaceIrrigation()
-
-
Method Details
-
fillAction
- Specified by:
fillAction
in classPriorityBot
-
equals
-
hashCode
public int hashCode() -
analyzeIrrigationToPlaceToCompletePatternObjective
This method will add the edge position to the irrigationToPlace list so that the bot knows that he has to place them in order to complete is pattern objectiv- Parameters:
board
- the boardbotState
- the bot state
-
allPatternObjectivesAreCompleted
Check if any of the pattern objectives are completed- Parameters:
botState
- the bot state- Returns:
- true if there is at least a pattern objective completed, false otherwise
-
getCandidateShapes
Get all the shape matching the patterns on the current pattern objectives- Parameters:
board
- the boardbotState
- the bot state- Returns:
- the list of shapes matching the pattern objectives
-
getCurrentPatternObjectives
-