Commit fcff8a01 authored by zlu's avatar zlu 🤸🏿
Browse files

Refactor to use array length for random number generator

parent a6025cdc
......@@ -23,7 +23,7 @@ update : Msg -> Model -> (Model, Cmd Msg)
update msg model =
case msg of
Roll ->
(model, Random.generate NewFace (Random.int 0 5))
(model, Random.generate NewFace (Random.int 0 (Array.length choices)))
NewFace newFace ->
(Model newFace, Cmd.none)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment