| 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 |
Chess.Game.Command
Description
Types and functions for commands that can change chess game states.
Documentation
A command can be applied to a chess game state in order to obtain a new game state.
Constructors
| EndTurn | Ends the turn of the active player. |
| Move Position (Some PlacedPiece) | Moves a placed piece to the specified position. |
| Destroy (Some PlacedPiece) | Removes a placed piece. |
| Spawn Position (Some Piece) | Creates a chess piece on the specified position. |
| Promote (Some PlacedPiece) (Some Piece) | Converts a chess piece into another piece. |
| Sequence Command Command | Represents the consecutive execution of two commands. |
| Atomic Command | Denotes that a command and its sub-commands belong together and should be treated as single command (e.g., when recording the history of a chess game). |