Skip to content

Instantly share code, notes, and snippets.

@brian-watkins
Created April 15, 2018 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brian-watkins/90e30d3199819fc2d720e87005ae2a1c to your computer and use it in GitHub Desktop.
Save brian-watkins/90e30d3199819fc2d720e87005ae2a1c to your computer and use it in GitHub Desktop.
scoresTagger : ScoresTagger Msg
scoresTagger =
ReceivedScores
updateWith : PersistScore Msg -> Msg -> Model -> (Model, Cmd Msg)
updateWith persistScore msg model =
case msg of
GameOver ->
(model, persistScore 4)
ReceivedScores scores ->
({ model | scores = scores }, Cmd.none)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment