1 | package com.takenoko.weather; | |
2 | ||
3 | import com.takenoko.actions.Action; | |
4 | import com.takenoko.engine.Board; | |
5 | import com.takenoko.engine.BotManager; | |
6 | import java.util.List; | |
7 | ||
8 | /** Weather that allows the player to play the same action twice. */ | |
9 | public class Windy extends Weather { | |
10 | @Override | |
11 | public List<Class<? extends Action>> apply(Board board, BotManager botManager) { | |
12 |
1
1. apply : removed call to com/takenoko/engine/Board::setWeather → KILLED |
board.setWeather(this); |
13 | return List.of(); | |
14 | } | |
15 | ||
16 | @Override | |
17 | public void revert(Board board, BotManager botManager) { | |
18 |
1
1. revert : removed call to com/takenoko/engine/Board::resetWeather → KILLED |
board.resetWeather(); |
19 | } | |
20 | ||
21 | @Override | |
22 | public String toString() { | |
23 |
1
1. toString : replaced return value with "" for com/takenoko/weather/Windy::toString → TIMED_OUT |
return "Windy"; |
24 | } | |
25 | } | |
Mutations | ||
12 |
1.1 |
|
18 |
1.1 |
|
23 |
1.1 |