diff --git a/board/src/bitboard/shifts.rs b/board/src/bitboard/shifts.rs index 2370306..8866d4c 100644 --- a/board/src/bitboard/shifts.rs +++ b/board/src/bitboard/shifts.rs @@ -7,58 +7,58 @@ impl BitBoard { const NOT_H_FILE: u64 = 0x7f7f7f7f7f7f7f7f; #[inline] - pub fn shift_north(&self, n: u8) -> BitBoard { + pub fn shift_north(self, n: u8) -> BitBoard { BitBoard(self.0 << (8 * n)) } #[inline] - pub fn shift_north_one(&self) -> BitBoard { + pub fn shift_north_one(self) -> BitBoard { BitBoard(self.0 << 8) } #[inline] - pub fn shift_north_east_one(&self) -> BitBoard { + pub fn shift_north_east_one(self) -> BitBoard { BitBoard(self.0 << 9 & BitBoard::NOT_A_FILE) } #[inline] - pub fn shift_east(&self, n: u8) -> BitBoard { + pub fn shift_east(self, n: u8) -> BitBoard { // TODO: Implement a bounds check here. BitBoard(self.0 << n) } #[inline] - pub fn shift_east_one(&self) -> BitBoard { + pub fn shift_east_one(self) -> BitBoard { BitBoard(self.0 << 1 & BitBoard::NOT_A_FILE) } #[inline] - pub fn shift_south_east_one(&self) -> BitBoard { + pub fn shift_south_east_one(self) -> BitBoard { BitBoard(self.0 >> 7 & BitBoard::NOT_A_FILE) } #[inline] - pub fn shift_south(&self, n: u8) -> BitBoard { + pub fn shift_south(self, n: u8) -> BitBoard { BitBoard(self.0 >> (8 * n)) } #[inline] - pub fn shift_south_one(&self) -> BitBoard { + pub fn shift_south_one(self) -> BitBoard { BitBoard(self.0 >> 8) } #[inline] - pub fn shift_south_west_one(&self) -> BitBoard { + pub fn shift_south_west_one(self) -> BitBoard { BitBoard(self.0 >> 9 & BitBoard::NOT_H_FILE) } #[inline] - pub fn shift_west_one(&self) -> BitBoard { + pub fn shift_west_one(self) -> BitBoard { BitBoard(self.0 >> 1 & BitBoard::NOT_H_FILE) } #[inline] - pub fn shift_north_west_one(&self) -> BitBoard { + pub fn shift_north_west_one(self) -> BitBoard { BitBoard(self.0 << 7 & BitBoard::NOT_H_FILE) } }