I appreciate that you've been maintaining the great library. I'm trying to write some code to solve tsume shogi with this.
use shogi::{Move, Position, Color, Piece, Square};
use shogi::bitboard::Factory as BBFactory;
use shogi::piece_type::PieceType;
fn main() {
BBFactory::init();
let mut pos = Position::new();
let sfen = "8l/8+R/8k/9/9/9/9/9/9 w r2b4g4s4n3l18p 1";
pos.set_sfen(sfen).unwrap();
assert_eq!(1, pos.hand(Piece{piece_type: PieceType::Rook, color: Color::White}), "initial");
pos.make_move(Move::from_sfen("1a1b").unwrap()).unwrap();
assert_eq!(2, pos.hand(Piece{piece_type: PieceType::Rook, color: Color::White}), "after make_move");
pos.unmake_move().unwrap();
assert_eq!(1, pos.hand(Piece{piece_type: PieceType::Rook, color: Color::White}), "after unmake_move");
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `1`,
right: `2`: after unmake_move', src/main.rs:47:5
stack backtrace:
後手の持駒:飛 角二 金四 銀四 桂四 香三 歩十八
9 8 7 6 5 4 3 2 1
+---------------------------+
| ・ ・ ・ ・ ・ ・ ・ ・v香|一
| ・ ・ ・ ・ ・ ・ ・ ・ 龍|二
| ・ ・ ・ ・ ・ ・ ・ ・v王|三
| ・ ・ ・ ・ ・ ・ ・ ・ ・|四
| ・ ・ ・ ・ ・ ・ ・ ・ ・|五
| ・ ・ ・ ・ ・ ・ ・ ・ ・|六
| ・ ・ ・ ・ ・ ・ ・ ・ ・|七
| ・ ・ ・ ・ ・ ・ ・ ・ ・|八
| ・ ・ ・ ・ ・ ・ ・ ・ ・|九
+---------------------------+
先手の持駒:なし