summaryrefslogtreecommitdiff
blob: 3dbad8251f8e7f6da447ae8cb5353631da6b1b9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
module ElmModule.Update exposing (update)

-- Elm -------------------------------------------------------------------------

-- Local Module ----------------------------------------------------------------
import Struct.Event
import Struct.Model

import Update.Story

--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
update : (
      Struct.Event.Type ->
      Struct.Model.Type ->
      (Struct.Model.Type, (Cmd Struct.Event.Type))
   )
update event model =
   case event of
      Struct.Event.None -> (model, Cmd.none)
      (Struct.Event.ChoiceSelected ix) ->
         ((Update.Story.select_choice ix model), Cmd.none)