YMFives.java

1
package io.github.mathieusoysal.yatzy_mod;
2
3
import io.github.mathieusoysal.Dices;
4
5
/**
6
 * The {@code YMFives} class represents the "Fives" category in the Yatzy game.
7
 * 
8
 * <p>
9
 * In the "Fives" category, the player scores the sum of the dice that show
10
 * the number five.
11
 * </p>
12
 *
13
 * @author MathieuSoysal
14
 * @see YatzyModInterface
15
 * @see YatzyModUtils
16
 */
17
class YMFives implements YatzyModInterface {
18
19
    /**
20
     * Calculates the score for the "Fives" category based on the sum of dice
21
     * values that show the number five.
22
     *
23
     * @param dices The set of dice to calculate the score for.
24
     * @return The calculated score, which is the sum of dice values that show the
25
     *         number five.
26
     * @see YatzyModUtils#filterAndSum(int, Dices)
27
     */
28
    @Override
29
    public int calculateScore(Dices dices) {
30 1 1. calculateScore : replaced int return with 0 for io/github/mathieusoysal/yatzy_mod/YMFives::calculateScore → KILLED
        return YatzyModUtils.filterAndSum(5, dices);
31
    }
32
}

Mutations

30

1.1
Location : calculateScore
Killed by : io.github.mathieusoysal.YatzyTest.[engine:junit-jupiter]/[class:io.github.mathieusoysal.YatzyTest]/[test-template:test_fives(int, int, int, int, int, int)]/[test-template-invocation:#2]
replaced int return with 0 for io/github/mathieusoysal/yatzy_mod/YMFives::calculateScore → KILLED

Active mutators

Tests examined


Report generated by PIT 1.15.0