blob: 5d7b275c8a0b631d1e5f287ed3ec4fdb9461def8 (
plain) (
blame)
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
31
32
33
34
35
36
37
|
{-# LANGUAGE TemplateHaskell #-}
--------------------------------------------------------------------------------
module Xanthous.Game.Env
( Config(..)
, defaultConfig
, disableSaving
, GameEnv(..)
, eventChan
, config
) where
--------------------------------------------------------------------------------
import Xanthous.Prelude
--------------------------------------------------------------------------------
import Brick.BChan (BChan)
import Xanthous.Data.App (AppEvent)
--------------------------------------------------------------------------------
data Config = Config
{ _disableSaving :: Bool
}
deriving stock (Generic, Show, Eq)
makeLenses ''Config
{-# ANN Config ("HLint: ignore Use newtype instead of data" :: String) #-}
defaultConfig :: Config
defaultConfig = Config
{ _disableSaving = False
}
--------------------------------------------------------------------------------
data GameEnv = GameEnv
{ _eventChan :: BChan AppEvent
, _config :: Config
}
deriving stock (Generic)
makeLenses ''GameEnv
|