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