summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2017-10-19 13:30:40 +0200 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2017-10-19 13:30:40 +0200 |
commit | e008855086d124f0de14eacc858ecb57d23e371c (patch) | |
tree | e3fe94dcf2966d17ac970b4b9cbbf6998c1f34a6 /elm/battlemap/src/Shim/Battlemap/Tile.elm | |
parent | ab299e08cee6ee9b2b122ce87b9bdab3b0dd637c (diff) |
Starting a more modular approach for the website.
Diffstat (limited to 'elm/battlemap/src/Shim/Battlemap/Tile.elm')
-rw-r--r-- | elm/battlemap/src/Shim/Battlemap/Tile.elm | 44 |
1 files changed, 0 insertions, 44 deletions
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) |