Add puzzle type.

This commit is contained in:
David Wang 2017-02-19 08:01:54 +11:00
parent c62c26aafd
commit 242dd19fca
2 changed files with 27 additions and 0 deletions

View File

@ -2,3 +2,7 @@
//! The puzzle rules are expressed as constraints.
extern crate bit_set;
pub use puzzle::Puzzle;
mod puzzle;

23
src/puzzle.rs Normal file
View File

@ -0,0 +1,23 @@
//! The puzzle's state and rules.
/// The puzzle to be solved.
#[allow(dead_code)]
pub struct Puzzle {
// The number of variables in the puzzle.
num_vars: usize,
}
impl Puzzle {
/// Allocate a new puzzle.
///
/// # Examples
///
/// ```
/// puzzle_solver::Puzzle::new();
/// ```
pub fn new() -> Self {
Puzzle {
num_vars: 0,
}
}
}