[][src]Crate myopic_board

Modules

constants
hash
parse

Structs

BitBoard

A bitboard is a value type wrapping a 64 bit integer which represents a set of squares on a chess board. Each bit is mapped to a particular square on the board, 0 -> H1, 1 -> G1,..., 8 -> H2,..., 63 -> A8. For example if we know a piece to reside on a particular square we can use a bitboard to to capture the available moves for that piece.

CastleZoneSet
Discards
MutBoardImpl

Enums

CastleZone

Represents one of the four different areas on a chessboard where the special castling move can take place (two for each side).

Dir

Type representing a square on a chessboard.

FenComponent

Represents the individual components which make up a board position encoded as a FEN string.

Move
MoveComputeType
Piece

Value type wrapping a single integer representing one of the 12 different pieces in a game of chess.

Side

Represents the two different teams in a game of chess.

Square

Type representing a square on a chessboard.

Termination

Represents the possible ways a game can be terminated, we only consider a game to be terminated when a side has no legal moves to make or if a special draw condition is met like position repetition. If a side has no legal moves and is currently in check then the game is lost, if it is not in check then the game is drawn.

Constants

STARTPOS_FEN

The start position of a chess game encoded in FEN format

Traits

MutBoard

Trait representing a mutable state of play of a chess game which can be evolved/devolved via (applicable) Move instances, compute the set of legal moves and queried for a variety of properties.

Reflectable

Chess is a symmetric game and this trait represents a component of the game which can be reflected to it's symmetric opposite component.

Functions

fen_position

Create a mutable board state from a fen string if it is valid.

start_position

Create a mutable board state representing the start of a standard chess game.