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 | /** Interface for the weather. */ | |
9 | public abstract class Weather { | |
10 | /** | |
11 | * Code to be executed when the weather is rolled and modifiers applied. | |
12 | * | |
13 | * @return List of actions to be executed after the weather is applied. | |
14 | */ | |
15 | public abstract List<Class<? extends Action>> apply(Board board, BotManager botManager); | |
16 | ||
17 | public abstract void revert(Board board, BotManager botManager); | |
18 | ||
19 | @Override | |
20 | public String toString() { | |
21 |
1
1. toString : replaced return value with "" for com/takenoko/weather/Weather::toString → NO_COVERAGE |
return this.getClass().getSimpleName(); |
22 | } | |
23 | ||
24 | @Override | |
25 | public boolean equals(Object o) { | |
26 |
2
1. equals : negated conditional → SURVIVED 2. equals : replaced boolean return with false for com/takenoko/weather/Weather::equals → NO_COVERAGE |
if (this == o) return true; |
27 |
3
1. equals : replaced boolean return with true for com/takenoko/weather/Weather::equals → SURVIVED 2. equals : negated conditional → KILLED 3. equals : negated conditional → KILLED |
return o != null && getClass() == o.getClass(); |
28 | } | |
29 | ||
30 | @Override | |
31 | public int hashCode() { | |
32 |
1
1. hashCode : replaced int return with 0 for com/takenoko/weather/Weather::hashCode → TIMED_OUT |
return this.getClass().hashCode(); |
33 | } | |
34 | } | |
Mutations | ||
21 |
1.1 |
|
26 |
1.1 2.2 |
|
27 |
1.1 2.2 3.3 |
|
32 |
1.1 |