aboutsummaryrefslogtreecommitdiff
blob: f8fb439bde5f010e20b8c7035ae668ebaf70b687 (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.Init exposing (init)

-- Battlemap -------------------------------------------------------------------
import Comm.LoadBattlemap

import Struct.Event
import Struct.Model

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

--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
init : (Struct.Model.Type, (Cmd Struct.Event.Type))
init =
   let
      model = (Struct.Model.new)
   in
      (
         model,
         (case (Comm.LoadBattlemap.try model) of
            (Just cmd) -> cmd
            Nothing -> Cmd.none
         )
      )