diff --git a/.gitignore b/.gitignore index 1ad6f29..1ed10a8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ /build*/ __pycache__/ uci-log.txt +cmake-build-debug +cmake-build-release diff --git a/Piece.cpp b/Piece.cpp index cf250ee..7a436d0 100644 --- a/Piece.cpp +++ b/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((static_cast(color) + 1) % 2); } diff --git a/Piece.hpp b/Piece.hpp index b03f268..3fde367 100644 --- a/Piece.hpp +++ b/Piece.hpp @@ -5,8 +5,8 @@ #include enum class PieceColor { - White, - Black + White = 0, + Black = 1, }; enum class PieceType {