35 lines
649 B
C++
35 lines
649 B
C++
#include "Piece.hpp"
|
|
|
|
#include <ostream>
|
|
|
|
Piece::Piece(PieceColor color, PieceType type) : _color(color), _type(type) {
|
|
}
|
|
|
|
Piece::Optional Piece::fromSymbol(char symbol) {
|
|
(void)symbol;
|
|
return std::nullopt;
|
|
}
|
|
|
|
PieceColor Piece::color() const {
|
|
return _color;
|
|
}
|
|
|
|
PieceType Piece::type() const {
|
|
return _type;
|
|
}
|
|
|
|
bool operator==(const Piece &lhs, const Piece &rhs) {
|
|
(void) lhs;
|
|
(void) rhs;
|
|
return false;
|
|
}
|
|
|
|
std::ostream &operator<<(std::ostream &os, const Piece &piece) {
|
|
(void) piece;
|
|
return os;
|
|
}
|
|
|
|
PieceColor operator!(PieceColor color) {
|
|
return static_cast<PieceColor>((static_cast<int>(color) + 1) % 2);
|
|
}
|