module Preferences where
import Configuration
import Data.Data
import Data.Binary
import Data.Binary.Generic
------------------
data Preferences = Preferences
{ configuration :: Configuration
, recursiveReveal :: Bool -- nem kell a scoreba?
, undoChangesSeed :: Bool -- nem kell a scoreba
, undoAllowed :: Bool
, hintAllowed :: Maybe HintType
}
deriving (Eq, Ord, Show, Typeable, Data)
defaultPreferences = Preferences
{ configuration = defaultConfiguration
, undoChangesSeed = True
, recursiveReveal = True
, undoAllowed = False
, hintAllowed = Nothing
}
data HintType
= NormalHint
| FullHint
deriving (Eq, Ord, Show, Enum, Typeable, Data)
instance Binary Preferences where
put = putGeneric
get = getGeneric
{-
instance Binary HintType where
put = putGeneric
get = getGeneric
-}