chessica-0.1.0.0: A Library for Chess Game Logic
Copyright(c) Michael Szvetits 2023
LicenseBSD-3-Clause (see the file LICENSE)
Maintainertypedbyte@qualified.name
Stabilitystable
Portabilityportable
Safe HaskellSafe-Inferred
LanguageGHC2021

Chess.Board.PlacedPiece

Description

Types and functions to create and analyze placed chess pieces.

Synopsis

Representing Placed Pieces

data PlacedPiece t Source #

Represents a chess piece that is currently placed on the board.

Constructors

PlacedPiece 

Fields

Instances

Instances details
HasField "color" (PlacedPiece t) Color Source # 
Instance details

Defined in Chess.Board.PlacedPiece

Methods

getField :: PlacedPiece t -> Color #

HasField "type'" (PlacedPiece t) (PieceType t) Source # 
Instance details

Defined in Chess.Board.PlacedPiece

Methods

getField :: PlacedPiece t -> PieceType t #

Show (PlacedPiece t) Source # 
Instance details

Defined in Chess.Board.PlacedPiece

Eq (PlacedPiece t) Source # 
Instance details

Defined in Chess.Board.PlacedPiece

Ord (PlacedPiece t) Source # 
Instance details

Defined in Chess.Board.PlacedPiece

Show (Some PlacedPiece) Source # 
Instance details

Defined in Chess.Board.PlacedPiece

Eq (Some PlacedPiece) Source # 
Instance details

Defined in Chess.Board.PlacedPiece

Ord (Some PlacedPiece) Source # 
Instance details

Defined in Chess.Board.PlacedPiece

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.