|
BenBot 1.7.5
A chess engine
|
Topics | |
| UTF8 encoded piece symbols | |
Files | |
| file | Colors.hpp |
| file | PieceTypes.hpp |
Namespaces | |
| namespace | chess |
| namespace | chess::pieces |
Classes | |
| struct | std::formatter< chess::pieces::Type > |
Enumerations | |
| enum class | chess::pieces::Color : std::uint_fast8_t { chess::pieces::Color::Black , chess::pieces::Color::White } |
| enum class | chess::pieces::Type : std::uint_fast8_t { chess::pieces::Type::Pawn , chess::pieces::Type::Knight , chess::pieces::Type::Bishop , chess::pieces::Type::Rook , chess::pieces::Type::Queen , chess::pieces::Type::King } |
Functions | |
| auto | chess::pieces::from_string (std::string_view text) -> std::expected< Type, std::string > |
| template<Color Side> | |
| constexpr auto | chess::pieces::other_side () noexcept -> Color |
| constexpr auto | chess::pieces::to_char (Type type, bool uppercase=true) -> char |
Classes for working with the various chess piece types, and associated information.
|
strong |
This enum identifies the side to move.
| Enumerator | |
|---|---|
| Black | The Black player. |
| White | The White player. |
Definition at line 29 of file Colors.hpp.
|
strong |
This enum identifies the different types of pieces.
| Enumerator | |
|---|---|
| Pawn | A White pawn. |
| Knight | A knight. |
| Bishop | A bishop. |
| Rook | A rook. |
| Queen | A queen. |
| King | A king. |
Definition at line 48 of file PieceTypes.hpp.
|
inlinenodiscard |
Parses a piece type from a string. This function recognizes single-letter abbreviations (such as N for knight, etc.), or full piece names.
If the input string cannot be parsed correctly, returns an explanatory error string.
Definition at line 133 of file PieceTypes.hpp.
|
nodiscardconstexpr |
Converts the given piece type to its single-character representation.
Definition at line 120 of file PieceTypes.hpp.