From d2b5c94b717e2d1b7b73a74a1f1ec6af70890a96 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Wed, 27 Sep 2017 10:48:49 +0200 Subject: Small cleanups. --- elm/battlemap/src/Battlemap/Navigator/Move.elm | 6 +++++- elm/battlemap/src/Battlemap/Tile.elm | 13 +++---------- 2 files changed, 8 insertions(+), 11 deletions(-) (limited to 'elm/battlemap/src/Battlemap') 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 -- cgit v1.2.3-70-g09d2