| summaryrefslogtreecommitdiff | 
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-09-22 13:46:32 +0200 | 
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-09-22 13:46:32 +0200 | 
| commit | 2d20dc042a386bc9f66bc5f535403227f9acf1b1 (patch) | |
| tree | 49e529ff4e12841d160627d9853c088ba0dd637b /client/elm/battlemap/src/Battlemap/Tile.elm | |
| parent | 0d5fba42a1597e5a43266c071776e7acf58071e2 (diff) | |
No more import ... exposing.
It got too confusing.
Diffstat (limited to 'client/elm/battlemap/src/Battlemap/Tile.elm')
| -rw-r--r-- | client/elm/battlemap/src/Battlemap/Tile.elm | 51 | 
1 files changed, 7 insertions, 44 deletions
diff --git a/client/elm/battlemap/src/Battlemap/Tile.elm b/client/elm/battlemap/src/Battlemap/Tile.elm index 70268bf..dca7a64 100644 --- a/client/elm/battlemap/src/Battlemap/Tile.elm +++ b/client/elm/battlemap/src/Battlemap/Tile.elm @@ -1,55 +1,18 @@ -module Battlemap.Tile exposing (Tile, generate, set_direction) +module Battlemap.Tile exposing (Type, set_direction) -import Battlemap.Direction exposing (Direction(..)) -import Character exposing (CharacterRef) +import Battlemap.Direction +import Character -import List exposing (map) -import Array exposing (Array, fromList) -import Set exposing (Set) - -type alias Tile = +type alias Type =     {        floor_level : Int, -      nav_level : Direction, -      char_level : (Maybe CharacterRef) +      nav_level : Battlemap.Direction.Type, +      char_level : (Maybe Character.Ref)  --    mod_level : (Set TileModifier)     } -set_direction : Direction -> Tile -> Tile +set_direction : Battlemap.Direction.Type -> Type -> Type  set_direction d t =     {t |        nav_level = d     } - -from_int : Int -> Tile -from_int i = -   if (i >= 10) -   then -      { -         floor_level = (i - 10), -         nav_level = None, -         char_level = (Just (toString (i - 10))) -      } -   else -      { -         floor_level = i, -         nav_level = None, -         char_level = Nothing -      } - - -generate : Int -> Int -> (Array Tile) -generate width height = -   (fromList -      (map -         (from_int) -         [ -            10,   1,    1,    2,    2,    2, -            1,    0,    0,    0,    11,   2, -            1,    0,    1,    2,    0,    2, -            3,    0,    3,    4,    0,    4, -            3,    12,   0,    0,    0,    4, -            3,    3,    3,    4,    4,    4 -         ] -      ) -   )  | 


