cleanroom implementation of a chess engine. doesn't work :)

add unicode chess symbols

+6 -6
+6 -6
src/lib.rs
··· 11 11 impl Piece { 12 12 fn from_char(ch: char) -> Option<Self> { 13 13 Some(match ch { 14 - 'N' => Self::Knight, 15 - 'B' => Self::Bishop, 16 - 'R' => Self::Rook, 17 - 'Q' => Self::Queen, 18 - 'K' => Self::King, 19 - 'P' => Self::Pawn, 14 + 'N' | '♘' | '♞' => Self::Knight, 15 + 'B' | '♗' | '♝' => Self::Bishop, 16 + 'R' | '♖' | '♜' => Self::Rook, 17 + 'Q' | '♕' | '♛' => Self::Queen, 18 + 'K' | '♔' | '♚' => Self::King, 19 + 'P' | '♙' | '♟' => Self::Pawn, 20 20 _ => return None, 21 21 }) 22 22 }