Function inanis::state::text::symbol_to_piece

source ·
pub fn symbol_to_piece(symbol: char) -> Result<usize, String>
Expand description

Converts piece symbol (p/P, n/N, b/B, r/R, q/Q, k/K) into the corresponding u8 value. Returns Err with the proper error messages when the symbol is unknown.