yatzy v1.0.0 API Reference
Modules
Game module responsible for
Module for player interactions
Determine the results of a given game
- Generating new rolls
- Rerolling all dice
- Rerolling some dice
- Enforcing game rules around re-rolls
Utility functions for calculating scores of a given roll.
Chance: Any combination of dice. Score: Sum of all the dice.
Fives: The sum of all dice showing the number 5.
Four of a Kind: Four dice with the same number. Score: Sum of those four dice.
Fours: The sum of all dice showing the number 4.
Full House: Any set of three combined with a different pair. Score: Sum of all the dice.
Large Straight: The combination 2-3-4-5-6. Score: 20 points (sum of all the dice).
One Pair: Two dice showing the same number. Score: Sum of those two dice.
Ones: The sum of all dice showing the number 1.
Sixes: The sum of all dice showing the number 6.
Small Straight: The combination 1-2-3-4-5. Score: 15 points (sum of all the dice).
Three of a Kind: Three dice showing the same number. Score: Sum of those three dice.
Threes: The sum of all dice showing the number 3.
Two Pairs: Two different pairs of dice. Score: Sum of dice in those two pairs.
Twos: The sum of all dice showing the number 2.
Yatzy: All five dice with the same number. Score: 50 points.
Operations on a sheets used to keep track of player's score