summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'elm/battlemap/src/Battlemap')
-rw-r--r--elm/battlemap/src/Battlemap/Navigator/Move.elm6
-rw-r--r--elm/battlemap/src/Battlemap/Tile.elm13
2 files changed, 8 insertions, 11 deletions
diff --git a/elm/battlemap/src/Battlemap/Navigator/Move.elm b/elm/battlemap/src/Battlemap/Navigator/Move.elm
index 924f715..9d7a17b 100644
--- a/elm/battlemap/src/Battlemap/Navigator/Move.elm
+++ b/elm/battlemap/src/Battlemap/Navigator/Move.elm
@@ -111,7 +111,11 @@ to : (
to battlemap nav dir char_list =
let
next_location = (Battlemap.Location.neighbor nav.current_location dir)
- is_occupied = (List.any (\c -> (c.location == next_location)) char_list)
+ is_occupied =
+ (List.any
+ (\c -> ((Character.get_location c) == next_location))
+ char_list
+ )
in
if (not is_occupied)
then
diff --git a/elm/battlemap/src/Battlemap/Tile.elm b/elm/battlemap/src/Battlemap/Tile.elm
index 986cb2a..7e0ae68 100644
--- a/elm/battlemap/src/Battlemap/Tile.elm
+++ b/elm/battlemap/src/Battlemap/Tile.elm
@@ -3,8 +3,7 @@ module Battlemap.Tile exposing
Type,
TileModifier(..),
set_direction,
- set_navigation,
- reset_tile
+ reset
)
import Battlemap.Direction
@@ -31,14 +30,8 @@ set_direction d t =
nav_level = d
}
-set_navigation : Battlemap.Direction.Type -> Type -> Type
-set_navigation dir t =
- {t |
- nav_level = dir
- }
-
-reset_tile : Type -> Type
-reset_tile t =
+reset: Type -> Type
+reset t =
{t |
nav_level = Battlemap.Direction.None,
mod_level = Nothing