shogi-rs
A Bitboard-based shogi library in Rust. Board representation, move generation/validation and time control utilities.
Usage
A library for implementing Shogi application.
shogi
provides a various types and implementations for representing concepts and rules in Shogi.
Most types can be created programatically while they can also be deserialized from / serialized to SFEN format.
See USIプロトコルとは (What is the USI protocol?) for more detail about UCI protocol specification and SFEN format.
Examples
use ;
use Factory as BBFactory;
use *;
init;
let mut pos = new;
// Position can be set from the SFEN formatted string.
pos.set_sfen.unwrap;
// You can programatically create a Move instance.
let m = Normal;
pos.make_move.unwrap;
// Move can be created from the SFEN formatted string as well.
let m = from_sfen.unwrap;
pos.make_move.unwrap;
// Position can be converted back to the SFEN formatted string.
assert_eq!;
License
shogi-rs
is licensed under the MIT license. Please read the LICENSE file in this repository for more information.