| 1 | package com.takenoko.weather; | |
| 2 | ||
| 3 | import com.takenoko.actions.Action; | |
| 4 | import com.takenoko.actions.actors.ForcedMovePandaAction; | |
| 5 | import com.takenoko.actions.weather.ChooseAndApplyWeatherAction; | |
| 6 | import com.takenoko.engine.Board; | |
| 7 | import com.takenoko.engine.BotManager; | |
| 8 | import java.util.List; | |
| 9 | ||
| 10 | /** | |
| 11 | * The sky rumbles and lightning strikes, frightening the panda. The player can put the panda on the | |
| 12 | * plot of his choice. To recover from his fear, the shy animal eats a section of bamboo. | |
| 13 | */ | |
| 14 | public class Stormy extends Weather { | |
| 15 | ||
| 16 | @Override | |
| 17 | public List<Class<? extends Action>> apply(Board board, BotManager botManager) { | |
| 18 |
1
1. apply : removed call to com/takenoko/engine/Board::setWeather → TIMED_OUT |
board.setWeather(this); |
| 19 |
1
1. apply : negated conditional → TIMED_OUT |
if (!board.getTilesWithoutPond().isEmpty()) { |
| 20 |
1
1. apply : replaced return value with Collections.emptyList for com/takenoko/weather/Stormy::apply → TIMED_OUT |
return List.of(ForcedMovePandaAction.class); |
| 21 | } | |
| 22 |
1
1. apply : removed call to com/takenoko/engine/BotManager::displayMessage → SURVIVED |
botManager.displayMessage( |
| 23 | botManager.getName() | |
| 24 | + " there aren't enough tiles to move the panda. You can choose the weather" | |
| 25 | + " you want."); | |
| 26 |
1
1. apply : replaced return value with Collections.emptyList for com/takenoko/weather/Stormy::apply → SURVIVED |
return List.of(ChooseAndApplyWeatherAction.class); |
| 27 | } | |
| 28 | ||
| 29 | @Override | |
| 30 | public void revert(Board board, BotManager botManager) { | |
| 31 |
1
1. revert : removed call to com/takenoko/engine/Board::resetWeather → TIMED_OUT |
board.resetWeather(); |
| 32 | } | |
| 33 | ||
| 34 | @Override | |
| 35 | public String toString() { | |
| 36 |
1
1. toString : replaced return value with "" for com/takenoko/weather/Stormy::toString → TIMED_OUT |
return "Stormy"; |
| 37 | } | |
| 38 | } | |
Mutations | ||
| 18 |
1.1 |
|
| 19 |
1.1 |
|
| 20 |
1.1 |
|
| 22 |
1.1 |
|
| 26 |
1.1 |
|
| 31 |
1.1 |
|
| 36 |
1.1 |