summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'elm/battlemap/src/Shim')
-rw-r--r--elm/battlemap/src/Shim/Battlemap.elm12
-rw-r--r--elm/battlemap/src/Shim/Battlemap/Tile.elm44
-rw-r--r--elm/battlemap/src/Shim/Model.elm54
3 files changed, 0 insertions, 110 deletions
diff --git a/elm/battlemap/src/Shim/Battlemap.elm b/elm/battlemap/src/Shim/Battlemap.elm
deleted file mode 100644
index 5a2e29b..0000000
--- a/elm/battlemap/src/Shim/Battlemap.elm
+++ /dev/null
@@ -1,12 +0,0 @@
-module Shim.Battlemap exposing (generate)
-
-import Shim.Battlemap.Tile
-
---generate : Battlemap.Type
-generate =
- {
- width = 16,
- height = 16,
- content = (Shim.Battlemap.Tile.generate 16),
- navigator = Nothing
- }
diff --git a/elm/battlemap/src/Shim/Battlemap/Tile.elm b/elm/battlemap/src/Shim/Battlemap/Tile.elm
deleted file mode 100644
index 1e11cb5..0000000
--- a/elm/battlemap/src/Shim/Battlemap/Tile.elm
+++ /dev/null
@@ -1,44 +0,0 @@
-module Shim.Battlemap.Tile exposing (generate)
-
-import Array
-import List
-
-import Battlemap.Tile
-
-from_int : Int -> Int -> (Int, Int) -> Battlemap.Tile.Type
-from_int map_width index (icon_id, cost) =
- {
- location =
- {
- x = (index % map_width),
- y = (index // map_width)
- },
- icon_id = (toString icon_id),
- crossing_cost = cost
- }
-
-generate : Int -> (Array.Array Battlemap.Tile.Type)
-generate map_width =
- let
- as_int_list =
- [
- (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (2, 99), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1),
- (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (2, 99), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1),
- (0, 1), (0, 1), (0, 1), (0, 1), (1, 2), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (2, 99), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1),
- (0, 1), (0, 1), (0, 1), (1, 2), (1, 2), (1, 2), (0, 1), (0, 1), (0, 1), (0, 1), (2, 99), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1),
- (0, 1), (0, 1), (1, 2), (1, 2), (1, 2), (1, 2), (1, 2), (0, 1), (0, 1), (0, 1), (2, 99), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1),
- (0, 1), (0, 1), (0, 1), (1, 2), (1, 2), (1, 2), (0, 1), (0, 1), (0, 1), (0, 1), (2, 99), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1),
- (0, 1), (0, 1), (0, 1), (0, 1), (1, 2), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (2, 99), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1),
- (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1),
- (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (2, 99), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1),
- (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (2, 99), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1),
- (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (2, 99), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1),
- (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (2, 99), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1),
- (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (2, 99), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1),
- (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (2, 99), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1),
- (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (2, 99), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1),
- (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (2, 99), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1)
- ]
- as_list = (List.indexedMap (from_int map_width) as_int_list)
- in
- (Array.fromList as_list)
diff --git a/elm/battlemap/src/Shim/Model.elm b/elm/battlemap/src/Shim/Model.elm
deleted file mode 100644
index f82a0d3..0000000
--- a/elm/battlemap/src/Shim/Model.elm
+++ /dev/null
@@ -1,54 +0,0 @@
-module Shim.Model exposing (generate)
-
-import Dict
-
-import Model
-
-import Shim.Battlemap
-
---generate : Model.Type
-generate =
- {
- state = Model.Default,
- selection = Model.None,
- error = Nothing,
- battlemap = (Shim.Battlemap.generate),
- characters =
- (Dict.insert
- "2"
- {
- id = "2",
- name = "Char2",
- icon = "Icon2",
- portrait = "Portrait2",
- location = {x = 0, y = 1},
- movement_points = 5,
- atk_dist = 1
- }
- (Dict.insert
- "1"
- {
- id = "1",
- name = "Char1",
- icon = "Icon1",
- portrait = "Portrait1",
- location = {x = 1, y = 0},
- movement_points = 4,
- atk_dist = 2
- }
- (Dict.insert
- "0"
- {
- id = "0",
- name = "Char0",
- icon = "Icon0",
- portrait = "Portrait0",
- location = {x = 0, y = 0},
- movement_points = 3,
- atk_dist = 1
- }
- Dict.empty
- )
- )
- )
- }