[Move] Fix streaming with promotion
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user