packages feed

macbeth-lib-0.0.12: src/Macbeth/Fics/Api/Seek.hs

module Macbeth.Fics.Api.Seek (
  Seek (..),
  StartMode,
  Title (..)
) where

import Macbeth.Fics.Api.Api
import Macbeth.Fics.Api.Game
import Macbeth.Fics.Api.Rating
import Macbeth.Fics.Utils.Bitmask

data Seek = Seek {
    id :: Int
  , name :: String
  , titles :: [Title] -- It is unlikely the titles will ever be mixed though as they should be exclusive. However the server does allow this.
  , rating :: Rating
  , timeStart :: Int
  , timeIncPerMove :: Int
  , isRated :: Bool
  , gameType :: GameType
  , color :: Maybe PColor
  , ratingRange :: (Int, Int)
--                 , startMode :: StartMode
--                 , checkFormula :: Bool
} deriving (Eq, Show)

data StartMode = Auto | Manual deriving (Show)

data Title =   Unregistered
             | Computer
             | GrandMaster
             | InternationalMaster
             | FideMaster
             | WomenGrandMaster
             | WomenInternationalMaster
             | WomenFideMaster deriving (Bounded, Enum, Eq, Show)

instance ToBitMask Title