update docs
This commit is contained in:
parent
671ff331d3
commit
b45952b6b7
5 changed files with 47 additions and 43 deletions
25
src/lib.rs
25
src/lib.rs
|
|
@ -5,19 +5,18 @@
|
|||
//!
|
||||
//! ## Overview
|
||||
//!
|
||||
//! The most important type in eschac is [`Position`](position::Position), it represents a chess
|
||||
//! position from which legal moves are generated. [`Position::new`](position::Position::new)
|
||||
//! returns the starting position of a chess game, and arbitrary positions can be built using the
|
||||
//! [`Setup`](setup::Setup) type, but they must be validated and converted to a
|
||||
//! [`Position`](position::Position) to generate moves as eschac does not handle certain illegal --
|
||||
//! as in unreachable in a normal game -- positions (see
|
||||
//! [`IllegalPositionReason`](setup::IllegalPositionReason) to know more). Legal moves are then
|
||||
//! generated using the [`Position::legal_moves`](position::Position::legal_moves) method or
|
||||
//! obtained from chess notation like [`UciMove`](uci::UciMove) or [`San`](san::San). Moves are
|
||||
//! represented with the [`Move<'l>`](moves::Move) type, which holds a reference to the origin
|
||||
//! position (hence the lifetime), this ensures the move is played on the correct position.
|
||||
//! Finally, moves are played using the [`Move::make`](moves::Move::make) method which returns a new
|
||||
//! [`Position`](position::Position), and on it goes.
|
||||
//! In eschac, a chess position is represented with the [`Position`](position::Position) type.
|
||||
//! [`Position::new`](position::Position::new) returns the starting position of a chess game, and
|
||||
//! arbitrary positions can be built using the [`Setup`](setup::Setup) type. This type must be
|
||||
//! validated and converted to a [`Position`](position::Position) to generate moves as eschac does
|
||||
//! not handle certain unreachable positions (see
|
||||
//! [`Setup::into_position`](setup::Setup::into_position) to know more). Legal moves are generated
|
||||
//! using the [`Position::legal_moves`](position::Position::legal_moves) method or obtained from
|
||||
//! chess notation like [`UciMove`](uci::UciMove) or [`San`](san::San). Moves are represented with
|
||||
//! the [`Move<'l>`](moves::Move) type, which holds a reference to the origin position (this
|
||||
//! ensures the move is played on the correct position). Finally, moves are played with
|
||||
//! [`Move::make`](moves::Move::make) which returns a new [`Position`](position::Position), and on
|
||||
//! it goes.
|
||||
//!
|
||||
//! ## Example
|
||||
//!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue