[Move] Fix streaming with promotion

This commit is contained in:
2022-12-21 21:05:05 +01:00
parent 16c7fe2a34
commit 11c84472d4
3 changed files with 30 additions and 21 deletions

View File

@@ -18,6 +18,8 @@ enum class PieceType {
King
};
std::ostream &operator<<(std::ostream &os, const PieceType &pt);
class Piece {
public:
@@ -27,11 +29,13 @@ public:
Piece(PieceColor color, PieceType type);
static Optional fromSymbol(char symbol);
static char toSymbol(PieceType type);
static std::optional<PieceType> pieceTypeFromSymbol(char symbol);
PieceColor color() const;
PieceType type() const;
char toSymbol() const;
private:
const PieceColor mColor;