Package com.takenoko.bot
Class PriorityBot
- Direct Known Subclasses:
ColletBot,GeneralTacticBot,IrrigationMaster,RushPandaBot,SmartApplyWeather,SmartApplyWind,SmartChooseAndApplyWeather,SmartDrawImprovement,SmartDrawIrrigation,SmartGardener,SmartObjective,SmartPanda,SmartPattern,SmartPlaceIrrigation,SmartStoreIrrigation,WeatherMaster
- 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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidadd(PriorityBot bot) protected voidaddActionWithPriority(Action action, double priority) protected voidaddWithAffine(PriorityBot bot, double multiplier, double offset) This method is used to add a bot with Affine function offsetprotected voidaddWithLinear(PriorityBot bot, double multiplier) This method is used to add a bot with a Linear function offsetprotected voidaddWithOffset(PriorityBot bot, double offset) This method is used to add a bot with an offsetprotected voidaddWithSquash(PriorityBot bot, double min, double max) This method is used to add a bot and squash the priority between two numberschooseAction(Board board, BotState botState, History history) This method will allow the player to choose an action to execute.protected PriorityBotbooleanprotected abstract voidfillAction(Board board, BotState botState, History history) inthashCode()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, valuesMethods inherited from class java.util.AbstractMap
toString
-
Field Details
-
DEFAULT_PRIORITY
public static final int DEFAULT_PRIORITY- See Also:
-
consoleUserInterface
-
-
Constructor Details
-
PriorityBot
public PriorityBot()
-
-
Method Details
-
fillAction
-
compute
-
chooseAction
Description copied from interface:BotThis method will allow the player to choose an action to execute.- Specified by:
chooseActionin interfaceBot- Parameters:
board- The board of the game.botState- The state of the bot.- Returns:
- The action chosen by the player.
-
addActionWithPriority
-
add
-
addWithOffset
This method is used to add a bot with an offset -
addWithLinear
This method is used to add a bot with a Linear function offset -
addWithAffine
This method is used to add a bot with Affine function offset -
addWithSquash
This method is used to add a bot and squash the priority between two numbers -
equals
-
hashCode
public int hashCode()
-