| 1 | package com.takenoko.objective; | |
| 2 | ||
| 3 | import com.takenoko.engine.Board; | |
| 4 | import com.takenoko.engine.BotState; | |
| 5 | ||
| 6 | /** This class represents the emperor objective. */ | |
| 7 | public class EmperorObjective extends Objective { | |
| 8 | public static final int EMPEROR_BONUS = 2; | |
| 9 | ||
| 10 | public EmperorObjective() { | |
| 11 | super(ObjectiveType.EMPEROR, ObjectiveState.ACHIEVED, EMPEROR_BONUS); | |
| 12 | } | |
| 13 | ||
| 14 | @Override | |
| 15 | public void verify(Board board, BotState botState) { | |
| 16 | // Do nothing as the objective is always achieved. | |
| 17 | } | |
| 18 | ||
| 19 | @Override | |
| 20 | public void reset() { | |
| 21 | // Do nothing as the objective is always achieved. | |
| 22 | } | |
| 23 | ||
| 24 | @Override | |
| 25 | public Objective copy() { | |
| 26 |
1
1. copy : replaced return value with null for com/takenoko/objective/EmperorObjective::copy → KILLED |
return new EmperorObjective(); |
| 27 | } | |
| 28 | ||
| 29 | @Override | |
| 30 | public float getCompletion(Board board, BotState botState) { | |
| 31 |
1
1. getCompletion : replaced float return with 0.0f for com/takenoko/objective/EmperorObjective::getCompletion → KILLED |
return 1f; |
| 32 | } | |
| 33 | ||
| 34 | @Override | |
| 35 | public String toString() { | |
| 36 |
1
1. toString : replaced return value with "" for com/takenoko/objective/EmperorObjective::toString → SURVIVED |
return "Emperor Objective"; |
| 37 | } | |
| 38 | } | |
Mutations | ||
| 26 |
1.1 |
|
| 31 |
1.1 |
|
| 36 |
1.1 |