This commit is contained in:
2025-02-20 11:22:06 -05:00
parent 20c43f3717
commit 16e453ddc9
2 changed files with 17 additions and 0 deletions

View File

@@ -84,6 +84,15 @@ mod test {
#[test]
fn set_and_get() {
let mut b = BitBoard::new();
for i in 0..BOARD_SIZE {
for j in 0..BOARD_SIZE {
assert_eq!(
b.get(i, j),
false,
"A just-initalized BitBoard should be completely empty"
)
}
}
assert!(!b.get(2, 4));
b.set(2, 4, true);
assert!(b.get(2, 4));