Skip to content

Commit a21355e

Browse files
Sync the yacht exercise's docs with the latest data.
1 parent eb877a8 commit a21355e

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Instructions
22

3-
The dice game [Yacht][yacht] is from the same family as Poker Dice, Generala and particularly Yahtzee, of which it is a precursor.
4-
In the game, five dice are rolled and the result can be entered in any of twelve categories.
5-
The score of a throw of the dice depends on category chosen.
3+
Given five dice and a category, calculate the score of the dice for that category.
4+
5+
~~~~exercism/note
6+
You'll always be presented with five dice.
7+
Each dice's value will be between one and six inclusively.
8+
The dice may be unordered.
9+
~~~~
610

711
## Scores in Yacht
812

@@ -21,15 +25,6 @@ The score of a throw of the dice depends on category chosen.
2125
| Choice | Sum of the dice | Any combination | 2 3 3 4 6 scores 18 |
2226
| Yacht | 50 points | All five dice showing the same face | 4 4 4 4 4 scores 50 |
2327

24-
If the dice do not satisfy the requirements of a category, the score is zero.
28+
If the dice do **not** satisfy the requirements of a category, the score is zero.
2529
If, for example, _Four Of A Kind_ is entered in the _Yacht_ category, zero points are scored.
2630
A _Yacht_ scores zero if entered in the _Full House_ category.
27-
28-
## Task
29-
30-
Given a list of values for five dice and a category, your solution should return the score of the dice for that category.
31-
If the dice do not satisfy the requirements of the category your solution should return 0.
32-
You can assume that five values will always be presented, and the value of each will be between one and six inclusively.
33-
You should not assume that the dice are ordered.
34-
35-
[yacht]: https://en.wikipedia.org/wiki/Yacht_(dice_game)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Introduction
2+
3+
Each year, something new is "all the rage" in your high school.
4+
This year it is a dice game: [Yacht][yacht].
5+
6+
The game of Yacht is from the same family as Poker Dice, Generala and particularly Yahtzee, of which it is a precursor.
7+
The game consists of twelve rounds.
8+
In each, five dice are rolled and the player chooses one of twelve categories.
9+
The chosen category is then used to score the throw of the dice.
10+
11+
[yacht]: https://en.wikipedia.org/wiki/Yacht_(dice_game)

0 commit comments

Comments
 (0)