[Piece] Format
This commit is contained in:
11
Piece.hpp
11
Piece.hpp
@@ -20,9 +20,6 @@ enum class PieceType {
|
||||
|
||||
class Piece {
|
||||
|
||||
const PieceColor _color;
|
||||
const PieceType _type;
|
||||
|
||||
public:
|
||||
|
||||
using Optional = std::optional<Piece>;
|
||||
@@ -33,10 +30,14 @@ public:
|
||||
|
||||
PieceColor color() const;
|
||||
PieceType type() const;
|
||||
|
||||
private:
|
||||
const PieceColor mColor;
|
||||
const PieceType mType;
|
||||
};
|
||||
|
||||
bool operator==(const Piece& lhs, const Piece& rhs);
|
||||
std::ostream& operator<<(std::ostream& os, const Piece& piece);
|
||||
bool operator==(const Piece &lhs, const Piece &rhs);
|
||||
std::ostream &operator<<(std::ostream &os, const Piece &piece);
|
||||
|
||||
// Invert a color (White becomes Black and vice versa)
|
||||
PieceColor operator!(PieceColor color);
|
||||
|
Reference in New Issue
Block a user