| summaryrefslogtreecommitdiff | 
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-09-27 10:31:16 +0200 | 
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-09-27 10:31:16 +0200 | 
| commit | 2c9b2af9ac011a871c5c02d3e2258fca73a98880 (patch) | |
| tree | 653db3959f444f1065f05658650c6ec81863d627 /client/elm/battlemap/src/Update/EndTurn.elm | |
| parent | 33e57128d48a012533c42635f52037fcdedd4c56 (diff) | |
Splits client and server into two repositories.
Diffstat (limited to 'client/elm/battlemap/src/Update/EndTurn.elm')
| -rw-r--r-- | client/elm/battlemap/src/Update/EndTurn.elm | 61 | 
1 files changed, 0 insertions, 61 deletions
diff --git a/client/elm/battlemap/src/Update/EndTurn.elm b/client/elm/battlemap/src/Update/EndTurn.elm deleted file mode 100644 index 7172b2f..0000000 --- a/client/elm/battlemap/src/Update/EndTurn.elm +++ /dev/null @@ -1,61 +0,0 @@ -module Update.EndTurn exposing (apply_to) - -import Dict - -import Battlemap -import Battlemap.Direction -import Battlemap.Navigator -import Battlemap.Tile - -import Model - -import Error - -make_it_so : Model.Type -> Model.Type -make_it_so model = -   case model.selection of -      Nothing -> {model | state = (Model.Error Error.Programming)} -      (Just selection) -> -         case (Dict.get selection.character model.characters) of -            Nothing -> {model | state = (Model.Error Error.Programming)} -            (Just char) -> -               {model | -                  state = Model.Default, -                  selection = Nothing, -                  battlemap = -                     (Battlemap.apply_to_all_tiles -                        (Battlemap.apply_to_tile_unsafe -                           (Battlemap.apply_to_tile_unsafe -                              model.battlemap -                              char.location -                              (\t -> {t | char_level = Nothing}) -                           ) -                           selection.navigator.current_location -                           (\t -> {t | char_level = (Just selection.character)}) -                        ) -                        (Battlemap.Tile.reset_tile) -                     ), -                  characters = -                     (Dict.update -                        selection.character -                        (\mc -> -                           case mc of -                              Nothing -> Nothing -                              (Just c) -> -                                 (Just -                                    {c | -                                       location = selection.navigator.current_location -                                    } -                                 ) -                        ) -                        model.characters -                     ) -               } - -apply_to : Model.Type -> Model.Type -apply_to model = -   case model.state of -      Model.MovingCharacterWithButtons -> (make_it_so model) -      Model.MovingCharacterWithClick -> (make_it_so model) -      _ -> {model | state = (Model.Error Error.IllegalAction)} -  | 


