Echecs is a pure Elixir chess library for move generation, validation, and game state management.
This module is the main entry point: new_game/0 and new_game/1 build a %Echecs.Game{}
from the start position or a FEN string, legal_moves/1 lists legal moves,
make_move/4 applies one if legal ({:ok, game} / {:error, :illegal_move}),
and status/1 reports :active, :checkmate, :stalemate or :draw.
Internals live in Echecs.Game, Echecs.MoveGen and Echecs.Board.
Summary
Functions
Returns a list of all legal moves for the current game state.
Makes a move if it is legal.
Starts a new chess game with the standard starting position.
Starts a new chess game from a given FEN string.
Returns the current status of the game (:active, :checkmate, :stalemate, :draw).
Functions
Returns a list of all legal moves for the current game state.
Makes a move if it is legal.
Returns {:ok, new_game} or {:error, reason}.
Starts a new chess game with the standard starting position.
Starts a new chess game from a given FEN string.
Returns the current status of the game (:active, :checkmate, :stalemate, :draw).