fix: inspections in Board
This commit is contained in:
1 parent
e27482082b
commit
e4a570e17b
1 file changed
+4
-4
@@ -30,7 +30,7 @@ impl<const N: usize> Board<N> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_mask(&self, x: usize, y: usize) -> u64 {
|
pub fn get_mask(&self, x: usize, y: usize) -> u64 {
|
||||||
if x >= 64 || y >= 2 || y >= N {
|
if y >= N || x >= 2 {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
self.layers[y][x]
|
self.layers[y][x]
|
||||||
@@ -41,9 +41,9 @@ impl<const N: usize> Board<N> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn and_mask_is_zero(&self, x: usize, y: usize, mask: u64) -> bool {
|
pub fn and_mask_is_zero(&self, x: usize, y: usize, mask: u64) -> bool {
|
||||||
// if x >= 64 || y >= 2 || y >= N {
|
if y >= N || x >= 2 {
|
||||||
// return false;
|
return false;
|
||||||
// }
|
}
|
||||||
(self.layers[y][x] & mask) == 0
|
(self.layers[y][x] & mask) == 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user