tangled
alpha
login
or
join now
nove.dev
/
outsider
0
fork
atom
cleanroom implementation of a chess engine. doesn't work :)
0
fork
atom
overview
issues
pulls
pipelines
add unicode chess symbols
nove.dev
8 months ago
04cedac5
53059657
+6
-6
1 changed file
expand all
collapse all
unified
split
src
lib.rs
+6
-6
src/lib.rs
···
11
11
impl Piece {
12
12
fn from_char(ch: char) -> Option<Self> {
13
13
Some(match ch {
14
14
-
'N' => Self::Knight,
15
15
-
'B' => Self::Bishop,
16
16
-
'R' => Self::Rook,
17
17
-
'Q' => Self::Queen,
18
18
-
'K' => Self::King,
19
19
-
'P' => Self::Pawn,
14
14
+
'N' | '♘' | '♞' => Self::Knight,
15
15
+
'B' | '♗' | '♝' => Self::Bishop,
16
16
+
'R' | '♖' | '♜' => Self::Rook,
17
17
+
'Q' | '♕' | '♛' => Self::Queen,
18
18
+
'K' | '♔' | '♚' => Self::King,
19
19
+
'P' | '♙' | '♟' => Self::Pawn,
20
20
_ => return None,
21
21
})
22
22
}