NPCLogic.java

1
package io.github.some_example_name;
2
3
public class NPCLogic {
4
5
    public static boolean update(
6
        boolean currentlyShowing,
7
        float distanceToPlayer,
8
        boolean ePressed,
9
        boolean spacePressed
10
    ) {
11 3 1. update : changed conditional boundary → SURVIVED
2. update : negated conditional → KILLED
3. update : negated conditional → KILLED
        if (distanceToPlayer < 50f && ePressed) {
12 1 1. update : replaced boolean return with false for io/github/some_example_name/NPCLogic::update → KILLED
            return true;
13
        }
14
15 3 1. update : changed conditional boundary → SURVIVED
2. update : negated conditional → KILLED
3. update : negated conditional → KILLED
        if (currentlyShowing && distanceToPlayer > 60f) {
16 1 1. update : replaced boolean return with true for io/github/some_example_name/NPCLogic::update → KILLED
            return false;
17
        }
18
19 1 1. update : negated conditional → KILLED
        if (spacePressed) {
20 1 1. update : replaced boolean return with true for io/github/some_example_name/NPCLogic::update → KILLED
            return false;
21
        }
22
23 2 1. update : replaced boolean return with false for io/github/some_example_name/NPCLogic::update → SURVIVED
2. update : replaced boolean return with true for io/github/some_example_name/NPCLogic::update → KILLED
        return currentlyShowing;
24
    }
25
}
26

Mutations

11

1.1
Location : update
Killed by : io.github.some_example_name.NPCLogicTest.[engine:junit-jupiter]/[class:io.github.some_example_name.NPCLogicTest]/[method:showsMessage_whenPlayerCloseAndEPressed()]
negated conditional → KILLED

2.2
Location : update
Killed by : io.github.some_example_name.NPCLogicTest.[engine:junit-jupiter]/[class:io.github.some_example_name.NPCLogicTest]/[method:showsMessage_whenPlayerCloseAndEPressed()]
negated conditional → KILLED

3.3
Location : update
Killed by : none
changed conditional boundary → SURVIVED

12

1.1
Location : update
Killed by : io.github.some_example_name.NPCLogicTest.[engine:junit-jupiter]/[class:io.github.some_example_name.NPCLogicTest]/[method:showsMessage_whenPlayerCloseAndEPressed()]
replaced boolean return with false for io/github/some_example_name/NPCLogic::update → KILLED

15

1.1
Location : update
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : update
Killed by : io.github.some_example_name.NPCLogicTest.[engine:junit-jupiter]/[class:io.github.some_example_name.NPCLogicTest]/[method:hidesMessage_whenPlayerMovesAway()]
negated conditional → KILLED

3.3
Location : update
Killed by : io.github.some_example_name.NPCLogicTest.[engine:junit-jupiter]/[class:io.github.some_example_name.NPCLogicTest]/[method:hidesMessage_whenPlayerMovesAway()]
negated conditional → KILLED

16

1.1
Location : update
Killed by : io.github.some_example_name.NPCLogicTest.[engine:junit-jupiter]/[class:io.github.some_example_name.NPCLogicTest]/[method:hidesMessage_whenPlayerMovesAway()]
replaced boolean return with true for io/github/some_example_name/NPCLogic::update → KILLED

19

1.1
Location : update
Killed by : io.github.some_example_name.NPCLogicTest.[engine:junit-jupiter]/[class:io.github.some_example_name.NPCLogicTest]/[method:hidesMessage_whenSpacePressed()]
negated conditional → KILLED

20

1.1
Location : update
Killed by : io.github.some_example_name.NPCLogicTest.[engine:junit-jupiter]/[class:io.github.some_example_name.NPCLogicTest]/[method:hidesMessage_whenSpacePressed()]
replaced boolean return with true for io/github/some_example_name/NPCLogic::update → KILLED

23

1.1
Location : update
Killed by : none
replaced boolean return with false for io/github/some_example_name/NPCLogic::update → SURVIVED

2.2
Location : update
Killed by : io.github.some_example_name.NPCLogicTest.[engine:junit-jupiter]/[class:io.github.some_example_name.NPCLogicTest]/[method:keepsMessageHidden_byDefault()]
replaced boolean return with true for io/github/some_example_name/NPCLogic::update → KILLED

Active mutators

Tests examined


Report generated by PIT 1.15.0