[Piece] Implement PieceColor ! operator

This commit is contained in:
2022-12-16 18:38:22 +01:00
parent 9f05ab03c1
commit dd7b9f009b
3 changed files with 10 additions and 9 deletions

2
.gitignore vendored
View File

@@ -2,3 +2,5 @@
/build*/ /build*/
__pycache__/ __pycache__/
uci-log.txt uci-log.txt
cmake-build-debug
cmake-build-release

View File

@@ -33,6 +33,5 @@ std::ostream& operator<<(std::ostream& os, const Piece& piece) {
} }
PieceColor operator!(PieceColor color) { PieceColor operator!(PieceColor color) {
(void)color; return static_cast<PieceColor>((static_cast<int>(color) + 1) % 2);
return PieceColor::White;
} }

View File

@@ -5,8 +5,8 @@
#include <iosfwd> #include <iosfwd>
enum class PieceColor { enum class PieceColor {
White, White = 0,
Black Black = 1,
}; };
enum class PieceType { enum class PieceType {