slidy 0.3.2

Utilities for working with sliding puzzles
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
pub(super) struct Pattern {
    pub(super) pieces: &'static [u8],
}

impl Pattern {
    pub(super) fn new(pieces: &'static [u8]) -> Self {
        Self { pieces }
    }

    pub(super) fn pdb_size(&self) -> usize {
        (0..self.pieces.len()).map(|i| 16 - i).product()
    }
}