Expand description

Rust shogi crates: Legality Checker (lite version) (rlib)

crate docs Rust Version license

This crate handles legality checking of moves in shogi.

Functions in this crate use no constant tables. This crate is no_std-aware, which means this crate is useful in embedded systems as well as ordinary applications.

Benchmark results are available at https://rust-shogi-crates.github.io/shogi_legality_lite/dev/bench/.

Available features

  • alloc: alloc-related functionalities are made available. Enabled by default.
  • std: std-related functionalities are made available. Implies alloc. Enabled by default.

Modules

Legality checking without confirming king’s safety.

Structs

A type for legality checking.

Functions

Finds all checks.

Finds all checks that are drop moves.

Finds all legal moves in the given position.

Finds all legal drop moves in the given position that drop piece.

Determines if king is in check.

Finds if a move is legal in the given position.

Finds if a move is legal in the given position.

Finds all legal normal moves in the given position that move a piece from from to some square.

Finds all legal normal moves in the given position that move piece from some square to to.

statusalloc

Returns the status of this position.

Returns the status of this position.