Move methods from Board to BitBoard
This commit is contained in:
@@ -23,4 +23,11 @@ std::ostream &operator<<(std::ostream &os, const BitBoard &board) {
|
||||
}
|
||||
|
||||
return os;
|
||||
}
|
||||
}
|
||||
|
||||
BitBoard BitBoard::getRank(int r) {
|
||||
return (genShift(1ULL, (r + 1) * 8) - 1) & genShift(~1ULL, r * 8 - 1);
|
||||
}
|
||||
BitBoard BitBoard::genShift(BitBoard x, const int s) {
|
||||
return (s < 0) ? (x >> -s) : (s > 63) ? x : (x << s);
|
||||
}
|
||||
|
Reference in New Issue
Block a user