Crate chess

source ·
Expand description

§Rust Chess Library

This is a chess move generation library for rust. It is designed to be fast, so that it can be used in a chess engine or UI without performance issues.

Structs§

  • A good old-fashioned bitboard You do not have access to the actual value. You do have access to operators
  • A representation of a chess board. That’s why you’re here, right?
  • Store a cache of entries, each with an associated hash.
  • Represent a ChessMove in memory
  • The move generation iterator This structure enumerates moves slightly slower than board.enumerate_moves(…), but has some extra features, such as:
  • Represent a square on the chess board

Enums§

  • What is the status of this game?
  • What castle rights does a particular player have?
  • Represent a color.
  • Describe a file (column) on a chess board
  • Represent a chess piece as a very simple enum
  • Describe a rank (row) on a chess board

Constants§

Functions§

  • Get a line between these two squares, not including the squares themselves.
  • Call before using any objects within this library. Must be called at least once. Can be called more than once, and is thread safe.
  • Get a BitBoard that represents the squares on the 1 or 2 files next to this file.
  • Get the moves for a bishop on a particular square, given blockers blocking my movement.
  • Get the rays for a bishop on a particular square.
  • Get a BitBoard that represents all the squares on a particular file.
  • Get the king moves for a particular square.
  • Get the knight moves for a particular square.
  • Get the pawn capture move for a particular square, given the pawn’s color and the potential victims
  • Get all the pawn moves for a particular square, given the pawn’s color and the potential blocking pieces and victims.
  • Get the quiet pawn moves (non-captures) for a particular square, given the pawn’s color and the potential blocking pieces.
  • Get a BitBoard that represents all the squares on a particular rank.
  • Get the moves for a rook on a particular square, given blockers blocking my movement.
  • Get the rays for a rook on a particular square.
  • Get a line (extending to infinity, which in chess is 8 squares), given two squares. This line does extend past the squares.