1 | package io.github.mathieusoysal.yatzy_mod; | |
2 | ||
3 | import io.github.mathieusoysal.Dices; | |
4 | ||
5 | /** | |
6 | * The {@code YMSixes} class represents the "Sixes" category in the Yatzy game. | |
7 | * | |
8 | * <p> | |
9 | * In the "Sixes" category, the player scores the sum of the dice that show | |
10 | * the number six. | |
11 | * </p> | |
12 | * | |
13 | * @author MathieuSoysal | |
14 | * @see YatzyModInterface | |
15 | * @see YatzyModUtils | |
16 | */ | |
17 | class YMSixes implements YatzyModInterface { | |
18 | ||
19 | /** | |
20 | * Calculates the score for the "Sixes" category based on the sum of dice | |
21 | * values that show the number six. | |
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 six. | |
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/YMSixes::calculateScore → KILLED |
return YatzyModUtils.filterAndSum(6, dices); |
31 | } | |
32 | } | |
Mutations | ||
30 |
1.1 |