Copyright | (c) Michael Szvetits 2023 |
---|---|
License | BSD-3-Clause (see the file LICENSE) |
Maintainer | typedbyte@qualified.name |
Stability | stable |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Types and functions to create and analyze placed chess pieces.
Synopsis
- data PlacedPiece t = PlacedPiece {}
- placedPiece :: Position -> Piece t -> Some PlacedPiece
- assumeType :: Alternative f => PieceType t -> PlacedPiece a -> f (PlacedPiece t)
Representing Placed Pieces
data PlacedPiece t Source #
Represents a chess piece that is currently placed on the board.
Instances
placedPiece :: Position -> Piece t -> Some PlacedPiece Source #
Smart constructor for creating Some
PlacedPiece
.
Analyzing Placed Pieces
assumeType :: Alternative f => PieceType t -> PlacedPiece a -> f (PlacedPiece t) Source #
Assumes that the given placed piece has the specified piece type.