PlayerLogic.java

1
package io.github.some_example_name;
2
3
public class PlayerLogic {
4
5
    public enum Frame {
6
        FRONT,
7
        BACK,
8
        SIDE
9
    }
10
11
    public static class FrameState {
12
        public final Frame frame;
13
        public final boolean flipX;
14
15
        public FrameState(Frame frame, boolean flipX) {
16
            this.frame = frame;
17
            this.flipX = flipX;
18
        }
19
    }
20
21
    public static FrameState decideFrame(Player.Direction direction) {
22
        switch (direction) {
23
            case UP:
24 1 1. decideFrame : replaced return value with null for io/github/some_example_name/PlayerLogic::decideFrame → KILLED
                return new FrameState(Frame.BACK, false);
25
            case DOWN:
26 1 1. decideFrame : replaced return value with null for io/github/some_example_name/PlayerLogic::decideFrame → KILLED
                return new FrameState(Frame.FRONT, false);
27
            case LEFT:
28 1 1. decideFrame : replaced return value with null for io/github/some_example_name/PlayerLogic::decideFrame → KILLED
                return new FrameState(Frame.SIDE, false);
29
            case RIGHT:
30 1 1. decideFrame : replaced return value with null for io/github/some_example_name/PlayerLogic::decideFrame → KILLED
                return new FrameState(Frame.SIDE, true);
31
            case NORTHEAST:
32 1 1. decideFrame : replaced return value with null for io/github/some_example_name/PlayerLogic::decideFrame → KILLED
                return new FrameState(Frame.BACK, true);
33
            case NORTHWEST:
34 1 1. decideFrame : replaced return value with null for io/github/some_example_name/PlayerLogic::decideFrame → KILLED
                return new FrameState(Frame.BACK, false);
35
            case SOUTHEAST:
36 1 1. decideFrame : replaced return value with null for io/github/some_example_name/PlayerLogic::decideFrame → KILLED
                return new FrameState(Frame.FRONT, true);
37
            case SOUTHWEST:
38 1 1. decideFrame : replaced return value with null for io/github/some_example_name/PlayerLogic::decideFrame → KILLED
                return new FrameState(Frame.FRONT, false);
39
            default:
40 1 1. decideFrame : replaced return value with null for io/github/some_example_name/PlayerLogic::decideFrame → NO_COVERAGE
                return new FrameState(Frame.FRONT, false);
41
        }
42
    }
43
}
44

Mutations

24

1.1
Location : decideFrame
Killed by : io.github.some_example_name.PlayerLogicTest.[engine:junit-jupiter]/[class:io.github.some_example_name.PlayerLogicTest]/[test-template:decideFrameAlwaysReturnsValidFrame(io.github.some_example_name.Player$Direction)]/[test-template-invocation:#1]
replaced return value with null for io/github/some_example_name/PlayerLogic::decideFrame → KILLED

26

1.1
Location : decideFrame
Killed by : io.github.some_example_name.PlayerLogicTest.[engine:junit-jupiter]/[class:io.github.some_example_name.PlayerLogicTest]/[test-template:decideFrameAlwaysReturnsValidFrame(io.github.some_example_name.Player$Direction)]/[test-template-invocation:#2]
replaced return value with null for io/github/some_example_name/PlayerLogic::decideFrame → KILLED

28

1.1
Location : decideFrame
Killed by : io.github.some_example_name.PlayerLogicTest.[engine:junit-jupiter]/[class:io.github.some_example_name.PlayerLogicTest]/[test-template:decideFrameAlwaysReturnsValidFrame(io.github.some_example_name.Player$Direction)]/[test-template-invocation:#3]
replaced return value with null for io/github/some_example_name/PlayerLogic::decideFrame → KILLED

30

1.1
Location : decideFrame
Killed by : io.github.some_example_name.PlayerLogicTest.[engine:junit-jupiter]/[class:io.github.some_example_name.PlayerLogicTest]/[method:rightUsesSideFrameFlipped()]
replaced return value with null for io/github/some_example_name/PlayerLogic::decideFrame → KILLED

32

1.1
Location : decideFrame
Killed by : io.github.some_example_name.PlayerLogicTest.[engine:junit-jupiter]/[class:io.github.some_example_name.PlayerLogicTest]/[test-template:decideFrameAlwaysReturnsValidFrame(io.github.some_example_name.Player$Direction)]/[test-template-invocation:#5]
replaced return value with null for io/github/some_example_name/PlayerLogic::decideFrame → KILLED

34

1.1
Location : decideFrame
Killed by : io.github.some_example_name.PlayerLogicTest.[engine:junit-jupiter]/[class:io.github.some_example_name.PlayerLogicTest]/[test-template:decideFrameAlwaysReturnsValidFrame(io.github.some_example_name.Player$Direction)]/[test-template-invocation:#6]
replaced return value with null for io/github/some_example_name/PlayerLogic::decideFrame → KILLED

36

1.1
Location : decideFrame
Killed by : io.github.some_example_name.PlayerLogicTest.[engine:junit-jupiter]/[class:io.github.some_example_name.PlayerLogicTest]/[method:southeastUsesFrontFrameFlipped()]
replaced return value with null for io/github/some_example_name/PlayerLogic::decideFrame → KILLED

38

1.1
Location : decideFrame
Killed by : io.github.some_example_name.PlayerLogicTest.[engine:junit-jupiter]/[class:io.github.some_example_name.PlayerLogicTest]/[method:southwestUsesFrontFrameNotFlipped()]
replaced return value with null for io/github/some_example_name/PlayerLogic::decideFrame → KILLED

40

1.1
Location : decideFrame
Killed by : none
replaced return value with null for io/github/some_example_name/PlayerLogic::decideFrame → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.15.0