| 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
 | module Model exposing (Model, model)
import Battlemap as Bp exposing (Battlemap, random, apply_to_all_tiles)
import Battlemap.Navigator as Nr exposing (Navigator, new_navigator)
import Character exposing (Character, CharacterRef)
import Dict exposing (Dict, empty, insert)
-- MODEL
type alias Model =
   {
      battlemap: Bp.Battlemap,
      navigator: (Maybe Nr.Navigator),
      selection: (Maybe String),
      characters: (Dict CharacterRef Character)
   }
model : Model
model =
   {
      battlemap = (Bp.random),
      navigator = Nothing,
      selection = Nothing,
      characters =
         (insert
            "2"
            {
               id = "2",
               name = "Char2",
               icon = "Icon2",
               portrait = "Portrait2",
               location = {x = 1, y = 4}
            }
            (insert
               "1"
               {
                  id = "1",
                  name = "Char1",
                  icon = "Icon1",
                  portrait = "Portrait1",
                  location = {x = 4, y = 1}
               }
               (insert
                  "0"
                  {
                     id = "0",
                     name = "Char0",
                     icon = "Icon0",
                     portrait = "Portrait0",
                     location = {x = 0, y = 0}
                  }
                  empty
               )
            )
         )
   }
 |