diff options
Diffstat (limited to 'src/solvers.rs')
-rw-r--r-- | src/solvers.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/solvers.rs b/src/solvers.rs index cf46030..2e69a01 100644 --- a/src/solvers.rs +++ b/src/solvers.rs @@ -34,7 +34,9 @@ impl Wall { pub fn output(&self, n: u32, h: u32) { let mut stones = vec![0; n as usize]; let mut toggle = 0; - let colors = ["\x1b[31m", "\x1b[32m", "\x1b[33m", "\x1b[34m", "\x1b[35m", "\x1b[36m"]; + let colors = [ + "\x1b[31m", "\x1b[32m", "\x1b[33m", "\x1b[34m", "\x1b[35m", "\x1b[36m", + ]; for row in 0..h { self.calculate_row(row, &mut stones); for &len in stones.iter() { @@ -68,7 +70,7 @@ impl<T: num::PrimInt> Solver<T> { n: (n as u32), h: (h as u32), w: (w as u32), - solve_stack: Vec::with_capacity(n), + solve_stack: vec![T::zero(); h], } } |