From d3f3890dc5408581eb6181125c871d1cf2c0e18f Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sun, 25 Aug 2019 13:28:10 -0400 Subject: 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 --- src/Xanthous/App.hs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/Xanthous/App.hs (limited to 'src/Xanthous/App.hs') diff --git a/src/Xanthous/App.hs b/src/Xanthous/App.hs new file mode 100644 index 0000000000..5c0383c38e --- /dev/null +++ b/src/Xanthous/App.hs @@ -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 [] + } -- cgit 1.4.1