Skip to main content

initial

Function initial 

Source
pub fn initial(a: &[[usize; 2]], b: &mut Vec<[usize; 2]>)
Expand description

Etches away initial nodes.

The first argument should be the solved maze. The second argument should be the original maze.

Examples found in repository?
examples/line.rs (line 13)
5fn main() {
6    let n = 4;
7    // 0 1 2 3
8    let mut x = shapes::dir_line(n);
9    while x.len() > 0 {
10        let m = solve(x.clone());
11        println!("{}", map::visualize(&map::map2([4, 1], &x)));
12        println!("{:?}\n---------------------------------------\n{:?}\n", x, m);
13        etch::initial(&m, &mut x);
14    }
15}