fn separate_keys_v(&mut self) -> bool {
        let height = self.v_keys.len();
        let mut progress = false;
        for i in 0..height {
            let len = self.v_keys[i].len();
            for j in 0..len {
                let mut key = &mut self.v_keys[i][j];
                for n in key.upper_bound..key.lower_bound {
                    match self.grid[i][n].cell_state {
                        Status::Empty => {
                            if n > key.lower_bound {
                                continue;
                            }
                            let upper_space = n - key.upper_bound;
                            let lower_space = key.lower_bound - 1 - n;

                            if upper_space < key.value {
                                key.upper_bound = n + 1;
                                progress = true;
                            }
                            if lower_space < key.value && n >= key.value {
                                key.lower_bound = n;
                                progress = true;
                            }
                        }
                        _ => continue,
                    }
                }
            }
        }
        progress
    }
//Zone key bounds further according to known empty cells
Zone key bounds further according to known empty cells
Zone key bounds further according to known empty cells
fn separate_keys_v(&mut self) -> bool {
        let height = self.v_keys.len();
        let mut progress = false;
        for i in 0..height {
            let len = self.v_keys[i].len();
            for j in 0..len {
                let mut key = &mut self.v_keys[i][j];
                for n in key.upper_bound..key.lower_bound {
                    match self.grid[i][n].cell_state {
                        Status::Empty => {
                            if n > key.lower_bound {
                                continue;
                            }
                            let upper_space = n - key.upper_bound;
                            let lower_space = key.lower_bound - 1 - n;
                            if upper_space < key.value {
                                key.upper_bound = n + 1;
                                progress = true;
                            }
                            if lower_space < key.value && n >= key.value {
                                key.lower_bound = n;
                                progress = true;
                            }
                        }
                        _ => continue,
                    }
                }
            }
        }
        progress
    }
fn separate_keys_v ( & mut self ) -> bool { let height = self . v_keys . len ( ) ; let mut progress = false ; for i in 0 .. height { let len = self . v_keys [ i ] . len ( ) ; for j in 0 .. len { let mut key = & mut self . v_keys [ i ] [ j ] ; for n in key . upper_bound .. key . lower_bound { match self . grid [ i ] [ n ] . cell_state { Status :: Empty => { if n > key . lower_bound { continue ; } let upper_space = n - key . upper_bound ; let lower_space = key . lower_bound - 1 - n ; if upper_space < key . value { key . upper_bound = n + 1 ; progress = true ; } if lower_space < key . value && n >= key . value { key . lower_bound = n ; progress = true ; } } _ => continue , } } } } progress }
Zone key bounds further according to known empty cells
Zone key bounds further according to known empty cells
&mut self
&mut self