mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:57:46 +00:00
LibChess: Make piece_for_char_promotion()
more generally useful
- Rename to make it clear it's not just for promotion - Understand 'p' for pawns - Take a char parameter instead of StringView since it's always 1 char
This commit is contained in:
parent
b111782f18
commit
c73c697f94
2 changed files with 16 additions and 14 deletions
|
@ -30,7 +30,7 @@ enum class Notation {
|
|||
FEN,
|
||||
};
|
||||
Optional<char> char_for_piece(Type, Notation);
|
||||
Chess::Type piece_for_char_promotion(StringView str);
|
||||
Type piece_from_char(char);
|
||||
|
||||
enum class Color : u8 {
|
||||
White,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue