add const_assert for BitBoard

This commit is contained in:
2025-02-12 10:35:54 -05:00
parent 9a114e2cb9
commit 993af2a191
3 changed files with 15 additions and 0 deletions

View File

@@ -1,4 +1,11 @@
use crate::board::BOARD_SIZE;
use static_assertions::const_assert_eq;
// BitBoard should be big enough to fit all points on the board
const_assert_eq!(
std::mem::size_of::<BitBoard>() * 8,
(BOARD_SIZE * BOARD_SIZE)
);
/// 8x8
/// TODO! look into variable length bit arrays in rust