Class Dices

java.lang.Object
io.github.mathieusoysal.Dices

public class Dices extends Object
The Dices class represents a set of five dice used in the Yatzy game. It allows you to store and manipulate the values of these dice.
See Also:
  • Constructor Details

    • Dices

      public Dices(int dice1, int dice2, int dice3, int dice4, int dice5)
      Constructs a new Dices object with the values of five dice.
      Parameters:
      dice1 - The value of the first die.
      dice2 - The value of the second die.
      dice3 - The value of the third die.
      dice4 - The value of the fourth die.
      dice5 - The value of the fifth die.
      Throws:
      IncorrectDiceValueException - If any of the dice values are not in the valid range [1, 6].
  • Method Details

    • getDicesIntStream

      public IntStream getDicesIntStream()
      Returns an IntStream of the dice values.
      Returns:
      An IntStream containing the values of the five dice.