We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43049e3 commit 19e3d89Copy full SHA for 19e3d89
exercises/practice/yacht/lib/yacht.ex
@@ -1,8 +1,21 @@
1
defmodule Yacht do
2
+ @type category ::
3
+ :ones
4
+ | :twos
5
+ | :threes
6
+ | :fours
7
+ | :fives
8
+ | :sixes
9
+ | :full_house
10
+ | :four_of_a_kind
11
+ | :little_straight
12
+ | :big_straight
13
+ | :choice
14
+ | :yacht
15
+
16
@doc """
17
Calculate the score of 5 dice using the given category's scoring method.
18
"""
- @spec score(category :: String.t(), dice :: [integer]) :: integer
- def score(category, dice) do
19
+ @spec score(category :: category(), dice :: [integer]) :: integer
20
end
21
0 commit comments