[Piece] Implement PieceColor ! operator
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,3 +2,5 @@
|
||||
/build*/
|
||||
__pycache__/
|
||||
uci-log.txt
|
||||
cmake-build-debug
|
||||
cmake-build-release
|
||||
|
13
Piece.cpp
13
Piece.cpp
@@ -21,18 +21,17 @@ PieceType Piece::type() const {
|
||||
return PieceType::Pawn;
|
||||
}
|
||||
|
||||
bool operator==(const Piece& lhs, const Piece& rhs) {
|
||||
(void)lhs;
|
||||
(void)rhs;
|
||||
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;
|
||||
std::ostream &operator<<(std::ostream &os, const Piece &piece) {
|
||||
(void) piece;
|
||||
return os;
|
||||
}
|
||||
|
||||
PieceColor operator!(PieceColor color) {
|
||||
(void)color;
|
||||
return PieceColor::White;
|
||||
return static_cast<PieceColor>((static_cast<int>(color) + 1) % 2);
|
||||
}
|
||||
|
Reference in New Issue
Block a user