Crate rschess

Source
Expand description

A Rust chess library with the aim to be as feature-rich as possible

Examples are available on the GitHub repository page.

Modules§

errors
Contains all rschess error types.

Structs§

Board
The structure for a chessboard/game
Fen
Represents FEN (Forsyth-Edwards Notation).
Move
The structure for a chess move, in the format (source square, destination square, castling/promotion/en passant)
Piece
Represents a piece in the format (piece type, color).
Position
The structure for a chess position

Enums§

Color
Represents a side/color.
DrawType
Represents types of draws.
GameResult
Represents game results.
Material
Represents a piece of material.
PieceType
Represents types of pieces.
SpecialMoveType
Represents types of special moves (castling/promotion/en passant).
WinType
Represents types of wins.

Functions§

idx_to_sq
Converts a square index (0..64) to a square name, returning an error if the square index is invalid.
sq_to_idx
Converts a square name to a square index, returning an error if the square name is invalid.