Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- The relative values of the various ranks of chess-piece.
- https://en.wikipedia.org/wiki/Chess_piece_relative_value#Hans_Berliner.27s_system%20Chess-piece%20relative%20values
Synopsis
- data RankValues
- tag :: String
- findRankValue :: Rank -> RankValues -> RankValue
- calculateMaximumTotalValue :: RankValues -> RankValue
- fromAssocs :: [(Rank, RankValue)] -> RankValues
Types
Data-types
data RankValues Source #
- The constant value associated with each rank; the higher, the more valuable it is considered to be.
- N.B.: only relative values are significant; the absolute value associated with any rank is irrelevant; typically ranks are valued in centipawns.
- CAVEAT: a
King
can never be taken, but assigning the value infinity creates problems, so typically it has the value0
.
Instances
Eq RankValues Source # | |
Defined in BishBosh.Input.RankValues (==) :: RankValues -> RankValues -> Bool # (/=) :: RankValues -> RankValues -> Bool # | |
Read RankValues Source # | |
Defined in BishBosh.Input.RankValues readsPrec :: Int -> ReadS RankValues # readList :: ReadS [RankValues] # readPrec :: ReadPrec RankValues # readListPrec :: ReadPrec [RankValues] # | |
Show RankValues Source # | |
Defined in BishBosh.Input.RankValues showsPrec :: Int -> RankValues -> ShowS # show :: RankValues -> String # showList :: [RankValues] -> ShowS # | |
Default RankValues Source # | |
Defined in BishBosh.Input.RankValues def :: RankValues # | |
NFData RankValues Source # | |
Defined in BishBosh.Input.RankValues rnf :: RankValues -> () # | |
XmlPickler RankValues Source # | |
Defined in BishBosh.Input.RankValues xpickle :: PU RankValues # | |
ShowFloat RankValues Source # | |
Defined in BishBosh.Input.RankValues showsFloat :: (Double -> ShowS) -> RankValues -> ShowS Source # |
Constants
Functions
findRankValue :: Rank -> RankValues -> RankValue Source #
Query.
calculateMaximumTotalValue :: RankValues -> RankValue Source #
- The maximum total rank-value one side can have.
- CAVEAT: assumes that zero pieces have been captured, all
Pawn
s have been queened, & that this is the most valuable rank of piece.
Constructor
fromAssocs :: [(Rank, RankValue)] -> RankValues Source #
Smart constructor.