summaryrefslogtreecommitdiff |
diff options
author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-09-25 16:08:43 +0200 |
---|---|---|
committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-09-25 16:08:43 +0200 |
commit | 9293fb062b0bf66995c72b30e037c762318be000 (patch) | |
tree | b20c47fcf589fb0f05d7c500766b1f427a8a9243 /client/elm/battlemap/src/Update/DirectionRequest.elm | |
parent | 1edd31d9972a7dec8cd54889e33bfdf1d5838670 (diff) |
Introduces 'States' for the model.
Diffstat (limited to 'client/elm/battlemap/src/Update/DirectionRequest.elm')
-rw-r--r-- | client/elm/battlemap/src/Update/DirectionRequest.elm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/elm/battlemap/src/Update/DirectionRequest.elm b/client/elm/battlemap/src/Update/DirectionRequest.elm index 2d8b42c..477ba71 100644 --- a/client/elm/battlemap/src/Update/DirectionRequest.elm +++ b/client/elm/battlemap/src/Update/DirectionRequest.elm @@ -9,10 +9,9 @@ import Model apply_to : Model.Type -> Battlemap.Direction.Type -> Model.Type apply_to model dir = - case (model.selection, model.navigator) of - (Nothing, _) -> model + case (model.state, model.navigator) of (_ , Nothing) -> model - ((Just char_id), (Just nav)) -> + ((Model.MovingCharacter _), (Just nav)) -> let (new_bmap, new_nav) = (Battlemap.Navigator.Move.to @@ -26,3 +25,4 @@ apply_to model dir = battlemap = new_bmap, navigator = (Just new_nav) } + (_, _) -> model |