blob: 544aa4bf2d631b0f569c9f499dd0a77b6ce913be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
module View.Status exposing (view)
import Dict
import Html
import Update
import Model
view : Model.Type -> (Html.Html Update.Type)
view model =
(Html.text
(case (model.selection, model.navigator) of
(Nothing, _) -> ""
(_, Nothing) -> ""
((Just char_id), (Just nav)) ->
case (Dict.get char_id model.characters) of
Nothing -> ""
(Just char) ->
(
"Controlling "
++ char.name
++ ": "
++ (toString nav.remaining_points)
++ "/"
++ (toString char.movement_points)
++ " movement points remaining."
)
)
)
|