diff --git a/Board.hpp b/Board.hpp index 36aadff..94d81d8 100644 --- a/Board.hpp +++ b/Board.hpp @@ -41,23 +41,23 @@ private: BitBoard mPieceBBs[BB_NUM] = {}; PieceColor mTurn = PieceColor::White; - static inline void clearIndex(BitBoard &b, unsigned int i) { + static inline void clearIndex(BitBoard &b, unsigned i) { b &= ~(1ULL << i); } - static inline void setIndex(BitBoard &b, unsigned int i) { + static inline void setIndex(BitBoard &b, unsigned i) { b |= 1ULL << i; } - static inline BitBoard indexToBitBoard(unsigned int i) { + static inline BitBoard indexToBitBoard(unsigned i) { return (1ULL << i); } - static inline PieceColor indexToColor(unsigned int i) { + static inline PieceColor indexToColor(unsigned i) { return static_cast(i % 2); } - static inline PieceType indexToType(unsigned int i) { + static inline PieceType indexToType(unsigned i) { return static_cast(i - (i % 2)); } };