Echecs.FEN (Echecs v0.1.5)

Copy Markdown View Source

Parsing and generation of Forsyth-Edwards Notation (FEN) strings.

parse/1 turns a FEN string into board, turn, castling, en-passant and clock fields consumed by Echecs.Game.new/1; to_string/1 serializes a game back. Squares follow the Echecs.Board 0 = a8 convention.

Summary

Functions

Parses a FEN string into its components.

Generates a FEN string from game components.

Types

fen()

@type fen() :: String.t()

Functions

parse(fen)

@spec parse(fen()) :: map()

Parses a FEN string into its components.

to_string(game)

Generates a FEN string from game components.