SmartPanda.java

1
package com.takenoko.bot.unitary;
2
3
import com.takenoko.actions.actors.ForcedMovePandaAction;
4
import com.takenoko.actions.actors.MovePandaAction;
5
import com.takenoko.bot.PriorityBot;
6
import com.takenoko.bot.utils.pathfinding.panda.PandaPathfinding;
7
import com.takenoko.engine.Board;
8
import com.takenoko.engine.BotState;
9
import com.takenoko.engine.History;
10
import com.takenoko.objective.PandaObjective;
11
import com.takenoko.vector.PositionVector;
12
import java.util.List;
13
import java.util.Map;
14
15
public class SmartPanda extends PriorityBot {
16
    @Override
17
    protected void fillAction(Board board, BotState botState, History history) {
18
        // If the panda is not on the bamboo, move it to the bamboo
19
20
        Map<PandaObjective, List<PositionVector>> completionMap =
21
                PandaPathfinding.getPandaMoves(board, botState);
22 1 1. fillAction : negated conditional → TIMED_OUT
        if (completionMap.size() != 0) {
23
            for (Entry<PandaObjective, List<PositionVector>> objective : completionMap.entrySet()) {
24
                for (PositionVector position : objective.getValue()) {
25 1 1. fillAction : removed call to com/takenoko/bot/unitary/SmartPanda::addActionWithPriority → TIMED_OUT
                    this.addActionWithPriority(
26
                            new MovePandaAction(position),
27
                            objective.getKey().getPoints()
28 1 1. fillAction : Replaced float division with multiplication → TIMED_OUT
                                    / objective.getKey().getCompletion(board, botState));
29 1 1. fillAction : removed call to com/takenoko/bot/unitary/SmartPanda::addActionWithPriority → TIMED_OUT
                    this.addActionWithPriority(
30
                            new ForcedMovePandaAction(position),
31
                            objective.getKey().getPoints()
32 1 1. fillAction : Replaced float division with multiplication → TIMED_OUT
                                    / objective.getKey().getCompletion(board, botState));
33
                }
34
            }
35
        }
36
    }
37
}

Mutations

22

1.1
Location : fillAction
Killed by : none
negated conditional → TIMED_OUT

25

1.1
Location : fillAction
Killed by : none
removed call to com/takenoko/bot/unitary/SmartPanda::addActionWithPriority → TIMED_OUT

28

1.1
Location : fillAction
Killed by : none
Replaced float division with multiplication → TIMED_OUT

29

1.1
Location : fillAction
Killed by : none
removed call to com/takenoko/bot/unitary/SmartPanda::addActionWithPriority → TIMED_OUT

32

1.1
Location : fillAction
Killed by : none
Replaced float division with multiplication → TIMED_OUT

Active mutators

Tests examined


Report generated by PIT 1.8.0