Expand description
§Rust shogi crates: Legality Checker (lite version) (rlib)
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. Impliesalloc. Enabled by default.
Modules§
- prelegality
- Legality checking without confirming king’s safety.
Structs§
- Lite
Legality Checker - A type for legality checking.
Functions§
- all_
checks_ partial alloc - Finds all checks.
- all_
drop_ checks_ partial - Finds all checks that are drop moves.
- all_
legal_ moves_ partial alloc - 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
fromto some square. - normal_
to_ candidates - Finds all legal normal moves in the given position that move
piecefrom some square toto. - status
alloc - Returns the status of this position.
- status_
partial - Returns the status of this position.