From beceea45a9840c306f8db79d4d02db400bd6426c Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Thu, 9 May 2019 22:07:36 +0200 Subject: Adds danger zone calculation. --- src/shared/battle-map/BattleMap/Struct/Marker.elm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/shared/battle-map/BattleMap/Struct/Marker.elm') diff --git a/src/shared/battle-map/BattleMap/Struct/Marker.elm b/src/shared/battle-map/BattleMap/Struct/Marker.elm index 21a1731..53204cb 100644 --- a/src/shared/battle-map/BattleMap/Struct/Marker.elm +++ b/src/shared/battle-map/BattleMap/Struct/Marker.elm @@ -1,9 +1,11 @@ module BattleMap.Struct.Marker exposing ( Type, + DataType, new, get_locations, set_locations, + get_data, is_in_locations, decoder, encode @@ -84,6 +86,9 @@ get_locations marker = marker.locations set_locations : (Set.Set BattleMap.Struct.Location.Ref) -> Type -> Type set_locations locations marker = {marker | locations = locations} +get_data : Type -> DataType +get_data marker = marker.data + is_in_locations : BattleMap.Struct.Location.Ref -> Type -> Bool is_in_locations loc_ref marker = (Set.member loc_ref marker.locations) -- cgit v1.2.3-70-g09d2