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 |
Implementation of the movement rule for pawns, according to the standard rulebook.
Documentation
movements :: PlacedPiece Pawn' -> Game -> [Command] Source #
Determines all possible movements (including captures, promotions and en passant) for a given pawn.
oneStep :: PlacedPiece Pawn' -> Board -> [Command] Source #
Determines all possible one-step forward movements (including promotions) for a given pawn.
twoSteps :: PlacedPiece Pawn' -> Board -> [Command] Source #
Determines all possible two-step forward movements for a given pawn.