Crate fen4

Source
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§

  • The board representation of a 4 player chess game. Board can be converted to and from a String in the fen4 format
  • Additional options in the FEN4 format stored as a list of key value pairs.
  • Position on the board e.g. a4

Enums§

  • Enum to store all ways Board can fail to parse
  • Color modifier for pieces
  • 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.
  • Enum to store all ways Piece can fail to parse
  • Enum to store all ways Position can fail to parse
  • Simple enum for used to denote a turn / player.