[bitboard] Write some documentation; mark some methods const

- Implement BitBoard::is_populated(), the opposite of ::is_empty()
- Write a bit of documentation for the BitBoard Library and for some methods on BitBoard
- Mark a few methods as const
This commit is contained in:
Eryn Wells 2024-03-08 08:15:45 -08:00
parent 20182d4035
commit 3f6ffef9f3
2 changed files with 38 additions and 5 deletions

View file

@ -1,5 +1,13 @@
// Eryn Wells <eryn@erynwells.me>
//! # The BitBoard Library
//!
//! This module implements a collection of commonly used BitBoards that can be
//! looked up efficiently as needed.
//!
//! The `library()` method returns a static instance of a `Library`, which
//! provides getters for all available BitBoards.
use crate::BitBoard;
use chessfriend_core::{Color, Direction, Square};
use std::sync::OnceLock;