pub fn display_uci_move(board: &Board, mv: Move) -> impl Display
Expand description

Returns an object that allows printing a Move in UCI format.

This differs from Move’s Display implementation in that it converts the king-captures-rook notation that cozy-chess uses to standard UCI castling (e.g. e1h1 displays as e1g1).

§Examples

let board: Board = "rnbqkb1r/ppp2ppp/4pn2/3p4/8/5NP1/PPPPPPBP/RNBQK2R w KQkq - 0 4"
    .parse().unwrap();
let castle: Move = "e1h1".parse().unwrap();
assert_eq!(format!("{}", display_uci_move(&board, castle)), "e1g1");