diff --git a/Board.cpp b/Board.cpp index 64e8d04..8320e39 100644 --- a/Board.cpp +++ b/Board.cpp @@ -33,11 +33,11 @@ Piece::Optional Board::piece(const Square &square) const { } void Board::setTurn(PieceColor turn) { - (void) turn; + mTurn = turn; } PieceColor Board::turn() const { - return PieceColor::White; + return mTurn; } void Board::setCastlingRights(CastlingRights cr) { diff --git a/Board.hpp b/Board.hpp index af76040..36aadff 100644 --- a/Board.hpp +++ b/Board.hpp @@ -39,6 +39,7 @@ public: private: BitBoard mPieceBBs[BB_NUM] = {}; + PieceColor mTurn = PieceColor::White; static inline void clearIndex(BitBoard &b, unsigned int i) { b &= ~(1ULL << i);