puzzles 0.1.0

The library for solving puzzles like sliding puzzle.
1
2
3
4
5
6
7
8
9
10
11
pub const DENIED: u8 = u8::MAX;

/// Number of bits needed to store either tile number or its position (index of the board cell).
pub const BITS_PER_CELL: u8 = 4;

/// 0..01..1 mask with BITS_PER_CELL bits set.
pub const BITS_PER_CELL_MASK32: u32 = (1u32<<BITS_PER_CELL)-1;
pub const BITS_PER_CELL_MASK64: u64 = BITS_PER_CELL_MASK32 as u64;

pub const MAX_BOARD_SIZE: usize = 1<<BITS_PER_CELL;