Crate shogi_legality_lite

Crate shogi_legality_lite 

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

prelegality
Legality checking without confirming king’s safety.

Structs§

LiteLegalityChecker
A type for legality checking.

Functions§

all_checks_partialalloc
Finds all checks.
all_drop_checks_partial
Finds all checks that are drop moves.
all_legal_moves_partialalloc
Finds all legal moves in the given position.
drop_candidates
Finds all legal drop moves in the given position that drop piece.
is_in_check_partial_lite
Determines if king is in check.
is_legal_partial
Finds if a move is legal in the given position.
is_legal_partial_lite
Finds if a move is legal in the given position.
normal_from_candidates
Finds all legal normal moves in the given position that move a piece from from to some square.
normal_to_candidates
Finds all legal normal moves in the given position that move piece from some square to to.
statusalloc
Returns the status of this position.
status_partial
Returns the status of this position.