| 1 | package com.takenoko.bot; | |
| 2 | ||
| 3 | import static com.takenoko.bot.utils.pathfinding.panda.PandaPathfinding.getPandaMovesThatEatBamboo; | |
| 4 | ||
| 5 | import com.takenoko.actions.actors.ForcedMovePandaAction; | |
| 6 | import com.takenoko.actions.actors.MovePandaAction; | |
| 7 | import com.takenoko.actions.improvement.ApplyImprovementFromInventoryAction; | |
| 8 | import com.takenoko.actions.objective.DrawObjectiveAction; | |
| 9 | import com.takenoko.bot.unitary.SmartChooseAndApplyWeather; | |
| 10 | import com.takenoko.bot.unitary.SmartDrawImprovement; | |
| 11 | import com.takenoko.bot.unitary.SmartDrawIrrigation; | |
| 12 | import com.takenoko.bot.unitary.SmartPanda; | |
| 13 | import com.takenoko.bot.utils.GameProgress; | |
| 14 | import com.takenoko.bot.utils.HistoryAnalysis; | |
| 15 | import com.takenoko.engine.Board; | |
| 16 | import com.takenoko.engine.BotState; | |
| 17 | import com.takenoko.engine.History; | |
| 18 | import com.takenoko.layers.tile.ImprovementType; | |
| 19 | import com.takenoko.objective.ObjectiveType; | |
| 20 | import com.takenoko.vector.PositionVector; | |
| 21 | import com.takenoko.weather.Cloudy; | |
| 22 | import java.util.List; | |
| 23 | import java.util.Map; | |
| 24 | ||
| 25 | public class ColletBot extends PriorityBot { | |
| 26 | ||
| 27 | @Override | |
| 28 | protected void fillAction(Board board, BotState botState, History history) { | |
| 29 |
1
1. fillAction : removed call to com/takenoko/bot/ColletBot::addWithOffset → KILLED |
addWithOffset((new SmartDrawIrrigation(3)).compute(board, botState, history), 100); |
| 30 | ||
| 31 |
1
1. fillAction : negated conditional → KILLED |
if (board.hasObjectiveTypeInDeck(ObjectiveType.PANDA)) { |
| 32 |
1
1. fillAction : removed call to com/takenoko/bot/ColletBot::addActionWithPriority → KILLED |
addActionWithPriority(new DrawObjectiveAction(ObjectiveType.PANDA), 200); |
| 33 |
1
1. fillAction : negated conditional → TIMED_OUT |
} else if (board.hasObjectiveTypeInDeck(ObjectiveType.GARDENER)) { |
| 34 |
1
1. fillAction : removed call to com/takenoko/bot/ColletBot::addActionWithPriority → TIMED_OUT |
addActionWithPriority(new DrawObjectiveAction(ObjectiveType.GARDENER), 40); |
| 35 | } else { | |
| 36 |
1
1. fillAction : removed call to com/takenoko/bot/ColletBot::addActionWithPriority → NO_COVERAGE |
addActionWithPriority(new DrawObjectiveAction(ObjectiveType.SHAPE), 10); |
| 37 | } | |
| 38 | ||
| 39 |
1
1. fillAction : removed call to com/takenoko/bot/ColletBot::addWithOffset → TIMED_OUT |
addWithOffset((new SmartPanda()).compute(board, botState, history), 50); |
| 40 | List<PositionVector> pandaMoveThatEatBamboo = getPandaMovesThatEatBamboo(board); | |
| 41 |
1
1. fillAction : negated conditional → KILLED |
if (!pandaMoveThatEatBamboo.isEmpty()) { |
| 42 |
1
1. fillAction : removed call to com/takenoko/bot/ColletBot::addActionWithPriority → KILLED |
addActionWithPriority(new MovePandaAction(pandaMoveThatEatBamboo.get(0)), 25); |
| 43 |
1
1. fillAction : removed call to com/takenoko/bot/ColletBot::addActionWithPriority → TIMED_OUT |
addActionWithPriority(new ForcedMovePandaAction(pandaMoveThatEatBamboo.get(0)), 25); |
| 44 | } | |
| 45 | ||
| 46 |
1
1. fillAction : negated conditional → KILLED |
if (HistoryAnalysis.getGameProgress(history).equals(GameProgress.EARLY_GAME)) { |
| 47 |
1
1. fillAction : removed call to com/takenoko/bot/ColletBot::addWithOffset → KILLED |
addWithOffset( |
| 48 | (new SmartChooseAndApplyWeather(new Cloudy())) | |
| 49 | .compute(board, botState, history), | |
| 50 | 50); | |
| 51 |
1
1. fillAction : removed call to com/takenoko/bot/ColletBot::addWithOffset → TIMED_OUT |
addWithOffset( |
| 52 | (new SmartDrawImprovement( | |
| 53 | Map.of( | |
| 54 | ImprovementType.WATERSHED, | |
| 55 | 1, | |
| 56 | ImprovementType.FERTILIZER, | |
| 57 | 1))) | |
| 58 | .compute(board, botState, history), | |
| 59 | 0); | |
| 60 | } | |
| 61 | if (HistoryAnalysis.analyzeRushPanda(history).keySet().stream() | |
| 62 |
3
1. fillAction : negated conditional → TIMED_OUT 2. lambda$fillAction$0 : negated conditional → TIMED_OUT 3. lambda$fillAction$0 : replaced boolean return with true for com/takenoko/bot/ColletBot::lambda$fillAction$0 → TIMED_OUT |
.anyMatch(k -> k != history.getCurrentBotManagerUUID())) { |
| 63 |
1
1. fillAction : removed call to com/takenoko/bot/ColletBot::addWithOffset → TIMED_OUT |
addWithOffset( |
| 64 | (new SmartDrawImprovement(Map.of(ImprovementType.ENCLOSURE, 3))) | |
| 65 | .compute(board, botState, history), | |
| 66 | 0); | |
| 67 |
1
1. fillAction : negated conditional → TIMED_OUT |
if (botState.getInventory().hasImprovement(ImprovementType.ENCLOSURE) |
| 68 |
1
1. fillAction : negated conditional → KILLED |
&& !board.getAvailableImprovementPositions().isEmpty()) { |
| 69 |
1
1. fillAction : removed call to com/takenoko/bot/ColletBot::addActionWithPriority → TIMED_OUT |
addActionWithPriority( |
| 70 | new ApplyImprovementFromInventoryAction( | |
| 71 | ImprovementType.ENCLOSURE, | |
| 72 | board.getAvailableImprovementPositions().get(0)), | |
| 73 | 0); | |
| 74 | } | |
| 75 | } | |
| 76 | ||
| 77 |
1
1. fillAction : removed call to com/takenoko/bot/ColletBot::addWithOffset → TIMED_OUT |
addWithOffset((new SmartChooseAndApplyWeather()).compute(board, botState, history), 0); |
| 78 | } | |
| 79 | } | |
Mutations | ||
| 29 |
1.1 |
|
| 31 |
1.1 |
|
| 32 |
1.1 |
|
| 33 |
1.1 |
|
| 34 |
1.1 |
|
| 36 |
1.1 |
|
| 39 |
1.1 |
|
| 41 |
1.1 |
|
| 42 |
1.1 |
|
| 43 |
1.1 |
|
| 46 |
1.1 |
|
| 47 |
1.1 |
|
| 51 |
1.1 |
|
| 62 |
1.1 2.2 3.3 |
|
| 63 |
1.1 |
|
| 67 |
1.1 |
|
| 68 |
1.1 |
|
| 69 |
1.1 |
|
| 77 |
1.1 |