module BishBosh.Model.DrawReason(
DrawReason(),
maximumConsecutiveRepeatablePlies,
maximumConsecutiveRepeatablePositions,
byAgreement,
seventyFiveMoveRule,
insufficientMaterial,
staleMate,
fiveFoldRepetition,
range
) where
import qualified BishBosh.Component.Move as Component.Move
import qualified Control.DeepSeq
data DrawReason
= ByAgreement
| FiftyMoveRule
| SeventyFiveMoveRule
| InsufficientMaterial
| StaleMate
| ThreeFoldRepetition
| FiveFoldRepetition
deriving (DrawReason -> DrawReason -> Bool
(DrawReason -> DrawReason -> Bool)
-> (DrawReason -> DrawReason -> Bool) -> Eq DrawReason
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DrawReason -> DrawReason -> Bool
$c/= :: DrawReason -> DrawReason -> Bool
== :: DrawReason -> DrawReason -> Bool
$c== :: DrawReason -> DrawReason -> Bool
Eq, ReadPrec [DrawReason]
ReadPrec DrawReason
Int -> ReadS DrawReason
ReadS [DrawReason]
(Int -> ReadS DrawReason)
-> ReadS [DrawReason]
-> ReadPrec DrawReason
-> ReadPrec [DrawReason]
-> Read DrawReason
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DrawReason]
$creadListPrec :: ReadPrec [DrawReason]
readPrec :: ReadPrec DrawReason
$creadPrec :: ReadPrec DrawReason
readList :: ReadS [DrawReason]
$creadList :: ReadS [DrawReason]
readsPrec :: Int -> ReadS DrawReason
$creadsPrec :: Int -> ReadS DrawReason
Read, Int -> DrawReason -> ShowS
[DrawReason] -> ShowS
DrawReason -> String
(Int -> DrawReason -> ShowS)
-> (DrawReason -> String)
-> ([DrawReason] -> ShowS)
-> Show DrawReason
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DrawReason] -> ShowS
$cshowList :: [DrawReason] -> ShowS
show :: DrawReason -> String
$cshow :: DrawReason -> String
showsPrec :: Int -> DrawReason -> ShowS
$cshowsPrec :: Int -> DrawReason -> ShowS
Show)
instance Control.DeepSeq.NFData DrawReason where
rnf :: DrawReason -> ()
rnf DrawReason
_ = ()
byAgreement :: DrawReason
byAgreement :: DrawReason
byAgreement = DrawReason
ByAgreement
fiftyMoveRule :: DrawReason
fiftyMoveRule :: DrawReason
fiftyMoveRule = DrawReason
FiftyMoveRule
seventyFiveMoveRule :: DrawReason
seventyFiveMoveRule :: DrawReason
seventyFiveMoveRule = DrawReason
SeventyFiveMoveRule
insufficientMaterial :: DrawReason
insufficientMaterial :: DrawReason
insufficientMaterial = DrawReason
InsufficientMaterial
staleMate :: DrawReason
staleMate :: DrawReason
staleMate = DrawReason
StaleMate
threeFoldRepetition :: DrawReason
threeFoldRepetition :: DrawReason
threeFoldRepetition = DrawReason
ThreeFoldRepetition
fiveFoldRepetition :: DrawReason
fiveFoldRepetition :: DrawReason
fiveFoldRepetition = DrawReason
FiveFoldRepetition
range :: [DrawReason]
range :: [DrawReason]
range = [DrawReason
byAgreement, DrawReason
fiftyMoveRule, DrawReason
seventyFiveMoveRule, DrawReason
insufficientMaterial, DrawReason
staleMate, DrawReason
threeFoldRepetition, DrawReason
fiveFoldRepetition]
maximumConsecutiveRepeatablePlies :: Component.Move.NMoves
maximumConsecutiveRepeatablePlies :: Int
maximumConsecutiveRepeatablePlies = Int
Component.Move.nPliesPerMove Int -> Int -> Int
forall a. Num a => a -> a -> a
* Int
75
maximumConsecutiveRepeatablePositions :: Component.Move.NMoves
maximumConsecutiveRepeatablePositions :: Int
maximumConsecutiveRepeatablePositions = Int
5