summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'client/elm/battlemap/src/Model.elm')
-rw-r--r--client/elm/battlemap/src/Model.elm49
1 files changed, 45 insertions, 4 deletions
diff --git a/client/elm/battlemap/src/Model.elm b/client/elm/battlemap/src/Model.elm
index 3d69c7d..61d827b 100644
--- a/client/elm/battlemap/src/Model.elm
+++ b/client/elm/battlemap/src/Model.elm
@@ -1,19 +1,60 @@
module Model exposing (Model, model)
-import Battlemap as Bp exposing (Battlemap, random)
-import Battlemap.Location exposing (..)
+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)
+ navigator: (Maybe Nr.Navigator),
+ selection: (Maybe String),
+ characters: (Dict CharacterRef Character)
}
model : Model
model =
{
battlemap = (Bp.random),
- navigator = (Just (Nr.new_navigator {x=2, y=4}))
+ navigator = Nothing,
+ selection = Nothing,
+ characters =
+ (insert
+ "2"
+ {
+ id = "2",
+ name = "Char2",
+ icon = "Icon2",
+ portrait = "Portrait2",
+ x = 1,
+ y = 4
+ }
+ (insert
+ "1"
+ {
+ id = "1",
+ name = "Char1",
+ icon = "Icon1",
+ portrait = "Portrait1",
+ x = 4,
+ y = 1
+ }
+ (insert
+ "0"
+ {
+ id = "0",
+ name = "Char0",
+ icon = "Icon0",
+ portrait = "Portrait0",
+ x = 0,
+ y = 0
+ }
+ empty
+ )
+ )
+ )
}