| summaryrefslogtreecommitdiff | 
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2020-05-24 16:09:10 +0200 | 
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2020-05-24 16:09:10 +0200 | 
| commit | 2e2caf6cc7df607686bbd8304ef23f62cf716939 (patch) | |
| tree | 1f648c2b19d628e2014e99aa15372ad8f1ec96a1 /src/shared | |
| parent | 4df61e290ac552711b96be1154df3a0eadabf262 (diff) | |
...
Diffstat (limited to 'src/shared')
| -rw-r--r-- | src/shared/battle-map/BattleMap/Struct/Map.elm | 4 | ||||
| -rw-r--r-- | src/shared/elm/Shared/Util/Array.elm | 10 | 
2 files changed, 7 insertions, 7 deletions
| diff --git a/src/shared/battle-map/BattleMap/Struct/Map.elm b/src/shared/battle-map/BattleMap/Struct/Map.elm index 3504f95..ed6c587 100644 --- a/src/shared/battle-map/BattleMap/Struct/Map.elm +++ b/src/shared/battle-map/BattleMap/Struct/Map.elm @@ -99,7 +99,7 @@ remove_marker marker_name map =              content =                 (Set.foldl                    (\loc array -> -                     (Shared.Util.Array.update_unsafe +                     (Shared.Util.Array.update                          (location_to_index                             (BattleMap.Struct.Location.from_ref loc)                             map @@ -122,7 +122,7 @@ add_marker marker_name marker map =        content =           (Set.foldl              (\loc array -> -               (Shared.Util.Array.update_unsafe +               (Shared.Util.Array.update                    (location_to_index                       (BattleMap.Struct.Location.from_ref loc)                       map diff --git a/src/shared/elm/Shared/Util/Array.elm b/src/shared/elm/Shared/Util/Array.elm index 234b4c4..a68aa5e 100644 --- a/src/shared/elm/Shared/Util/Array.elm +++ b/src/shared/elm/Shared/Util/Array.elm @@ -1,7 +1,7 @@  module Shared.Util.Array exposing     (        update, -      update_unsafe, +      update_or_insert,        filter_first,        indexed_search     ) @@ -9,24 +9,24 @@ module Shared.Util.Array exposing  import List  import Array -update : ( +update_or_insert : (        Int ->        ((Maybe t) -> (Maybe t)) ->        (Array.Array t) ->        (Array.Array t)     ) -update index fun array = +update_or_insert index fun array =     case (fun (Array.get index array)) of        Nothing -> array        (Just e) -> (Array.set index e array) -update_unsafe : ( +update : (        Int ->        (t -> t) ->        (Array.Array t) ->        (Array.Array t)     ) -update_unsafe index fun array = +update index fun array =     case (Array.get index array) of        Nothing -> array        (Just e) -> (Array.set index (fun e) array) | 


