Skip to content

Commit

Permalink
Change context message to instruct player
Browse files Browse the repository at this point in the history
  • Loading branch information
mwunsch committed Nov 2, 2016
1 parent b028c18 commit f47a768
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/Main.elm
Expand Up @@ -143,7 +143,25 @@ update msg game =
update NoOp game

Command action ->
( { game | player = game.player |> \p -> { p | action = action } }, Cmd.none )
let
message : Maybe ContextMessage
message =
case action of
Action.Move ->
Just ( "lightblue", "Click to move your dude" )

Action.Shoot ->
Just ( "red", "Select a target" )

_ ->
Nothing
in
( { game
| player = game.player |> \p -> { p | action = action }
, contextMessage = message
}
, Cmd.none
)

Complete action ->
let
Expand Down

0 comments on commit f47a768

Please sign in to comment.