summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-09-27 10:48:49 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-09-27 10:48:49 +0200
commitd2b5c94b717e2d1b7b73a74a1f1ec6af70890a96 (patch)
tree2f9d949f74b8affcd8f0fb8073f0144edf3c2a2c /elm/battlemap/src/Battlemap
parentaf039b0e32b21bd9ac5db4aabdfc04107f4a0a74 (diff)
Small cleanups.
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