1 | package com.takenoko.actions.improvement; | |
2 | ||
3 | import com.takenoko.actions.Action; | |
4 | import com.takenoko.actions.ActionResult; | |
5 | import com.takenoko.actions.annotations.ActionAnnotation; | |
6 | import com.takenoko.actions.annotations.ActionType; | |
7 | import com.takenoko.engine.Board; | |
8 | import com.takenoko.engine.BotManager; | |
9 | import com.takenoko.layers.tile.ImprovementType; | |
10 | import java.util.List; | |
11 | ||
12 | /** Action to store an improvement in the inventory. */ | |
13 | @ActionAnnotation(ActionType.FORCED) | |
14 | public class StoreImprovementAction implements Action { | |
15 | @Override | |
16 | public ActionResult execute(Board board, BotManager botManager) { | |
17 | ImprovementType improvementType = board.peekImprovement(); | |
18 |
1
1. execute : removed call to com/takenoko/engine/BotManager::displayMessage → TIMED_OUT |
botManager.displayMessage(botManager.getName() + " stored improvement " + improvementType); |
19 |
1
1. execute : removed call to com/takenoko/inventory/Inventory::storeImprovement → KILLED |
botManager.getInventory().storeImprovement(improvementType); |
20 |
1
1. execute : replaced return value with null for com/takenoko/actions/improvement/StoreImprovementAction::execute → KILLED |
return new ActionResult(List.of(ApplyImprovementFromInventoryAction.class), 0); |
21 | } | |
22 | } | |
Mutations | ||
18 |
1.1 |
|
19 |
1.1 |
|
20 |
1.1 |