Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- The details of a player's turn.
Synopsis
- data Turn
- compareByLVA :: EvaluateRank -> Turn -> Turn -> Ordering
- compareByMVVLVA :: EvaluateRank -> Turn -> Turn -> Ordering
- mkTurn :: QualifiedMove -> Rank -> Turn
- isCapture :: Turn -> Bool
- isPawnDoubleAdvance :: Turn -> LogicalColour -> Bool
Types
Data-types
- Defines one turn of a player.
- Additional data is recorded to facilitate both rollback & recording of the move in various conventional notations.
Instances
Eq Turn Source # | |
Read Turn Source # | |
Show Turn Source # | |
NFData Turn Source # | |
Defined in BishBosh.Component.Turn | |
ReflectableOnX Turn Source # | |
Defined in BishBosh.Component.Turn reflectOnX :: Turn -> Turn Source # | |
ShowNotation Turn Source # | |
Defined in BishBosh.Notation.MoveNotation showsNotation :: MoveNotation -> Turn -> ShowS Source # |
Functions
compareByLVA :: EvaluateRank -> Turn -> Turn -> Ordering Source #
Forwards the request to compareByLVA
.
compareByMVVLVA :: EvaluateRank -> Turn -> Turn -> Ordering Source #
- Compares turns by https://www.chessprogramming.org/MVV-LVA.
- This orders the most valuable victim of an attack first, but when victims are of equal rank, orders the least valuable aggressor first.
- N.B.: the order of non-capture moves (including promotions) isn't defined.
- CAVEAT: no account is made for any defenders of the attacked piece, which might recoup transient gains.
Constructor
Predicates
:: Turn | |
-> LogicalColour | Defines the side whose turn is referenced. |
-> Bool |
Whether the turn represents a Pawn
's initial two-square advance.