Functions related to creating and modifying data structures used in Magnus.
Functions related to creating and modifying data structures used in Magnus.
All possible file rank tuples for a chessboard.
All possible file rank tuples for a chessboard.
(clear-square state square)
Clear square of any piece currently occupying it.
Clear square of any piece currently occupying it.
(get-en-passant state)
Get en-passant square if there is one, else nil.
Get en-passant square if there is one, else nil.
(get-piece state [file rank])
Get piece at square.
Get piece at square.
(get-player-in-turn state)
Returns the player who's turn it currently is.
Returns the player who's turn it currently is.
Beginning state for a chess game but with no pieces on the board.
Beginning state for a chess game but with no pieces on the board.
Beginning state for a standard chess game.
Beginning state for a standard chess game.
(new-piece color type)
Create a piece of given type and color.
Create a piece of given type and color.
(set-moved state [file rank])
Mark piece at square as having been moved.
Mark piece at square as having been moved.
(set-piece state piece [file rank])
Place piece at square.
Place piece at square.
(set-result state result)
Sets result of a game.
Sets result of a game.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close