Crate fen4[][src]

Expand description

Fen4 provides a mapping from a simple representation of a 4 player chess board and the fen4 file format used by Chess.com.

Quick Start

The Board struct is the important type in this crate. All other types are present to support all the features of Board. The most common ways to get a Board would be via FromStr or Default.

let empty_fen = "R-0,0,0,0-0,0,0,0-0,0,0,0-0,0,0,0-0-14/14/14/14/14/14/14/14/14/14/14/14/14/14";
let board :  Result<fen4::Board,fen4::BoardParseError> = empty_fen.parse();
println!("{}",board?);

Structs

Board

The board representation of a 4 player chess game. Board can be converted to and from a String in the fen4 format

Extra

Additional options in the FEN4 format stored as a list of key value pairs.

Position

Position on the board e.g. a4

Enums

BoardParseError

Enum to store all ways Board can fail to parse

Color

Color modifier for pieces

Piece

Simple representation of pieces that allows all types of fairy pieces The trick is to just use the character that the notation uses to represent that piece.

PieceParseError

Enum to store all ways Piece can fail to parse

PositionParseError

Enum to store all ways Position can fail to parse

TurnColor

Simple enum for used to denote a turn / player.