[Board] Refactor unsigned int -> unsigned
This commit is contained in:
10
Board.hpp
10
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<PieceColor>(i % 2);
|
||||
}
|
||||
|
||||
static inline PieceType indexToType(unsigned int i) {
|
||||
static inline PieceType indexToType(unsigned i) {
|
||||
return static_cast<PieceType>(i - (i % 2));
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user