Implement messages

Implement messages almost the same as in the Rust version, only with
YAML instead of TOML this time, and a regular old mustache template
instead of something handrolled. Besides that, pretty much everything
here is the same.
This commit is contained in:
Griffin Smith 2019-09-01 13:54:27 -04:00
parent 4ef19aa35a
commit 2fd3e4c9ad
13 changed files with 587 additions and 17 deletions

View file

@ -4,7 +4,7 @@ import Xanthous.Prelude
import Brick hiding (App)
import qualified Brick
import Graphics.Vty.Attributes (defAttr)
import Graphics.Vty.Input.Events (Event(EvResize, EvKey))
import Graphics.Vty.Input.Events (Event(EvKey))
import Xanthous.Game
import Xanthous.Game.Draw (drawGame)
@ -32,4 +32,4 @@ handleEvent game _ = continue game
handleCommand :: Command -> GameState -> EventM Name (Next GameState)
handleCommand Quit = halt
handleCommand (Move dir) = continue . (characterPosition %~ move dir)
handleCommand _ = undefined
handleCommand _ = error "unimplemented"