An @-sign in a box, in haskell

Initial commit of a Haskell version of Xanthous, written using Brick and
built with Nix.

This is so much nicer and so much easier
This commit is contained in:
Griffin Smith 2019-08-25 13:28:10 -04:00
parent fb0d1b3e66
commit d3f3890dc5
17 changed files with 1075 additions and 3 deletions

21
src/Xanthous/App.hs Normal file
View file

@ -0,0 +1,21 @@
module Xanthous.App (makeApp) where
import Xanthous.Prelude
import Brick hiding (App)
import qualified Brick
import Graphics.Vty.Attributes (defAttr)
import Xanthous.Game
import Xanthous.Game.Draw (drawGame)
import Xanthous.Resource (Name)
type App = Brick.App GameState () Name
makeApp :: IO App
makeApp = pure $ Brick.App
{ appDraw = drawGame
, appChooseCursor = const headMay
, appHandleEvent = resizeOrQuit
, appStartEvent = pure
, appAttrMap = const $ attrMap defAttr []
}