fn drop_colors(&mut self, avail: &mut Colors, row: u8, col: u8) {
        for idx in range(0u8, 9u8) {
            avail.remove(self.grid[idx][col]); /* check same column fields */
            avail.remove(self.grid[row][idx]); /* check same row fields */
        }

        // check same block fields
        let row0 = (row / 3u8) * 3u8;
        let col0 = (col / 3u8) * 3u8;
        for alt_row in range(row0, row0 + 3u8) {
            for alt_col in range(col0, col0 + 3u8) {
                avail.remove(self.grid[alt_row][alt_col]);
            }
        }
    }
// find colors available in neighbourhood of (row, col)
find colors available in neighbourhood of (row, col)
find colors available in neighbourhood of ( row col )
fn drop_colors(&mut self, avail: &mut Colors, row: u8, col: u8) {
        for idx in range(0u8, 9u8) {
            avail.remove(self.grid[idx][col]); /* check same column fields */
            avail.remove(self.grid[row][idx]); /* check same row fields */
        }
        // check same block fields
        let row0 = (row / 3u8) * 3u8;
        let col0 = (col / 3u8) * 3u8;
        for alt_row in range(row0, row0 + 3u8) {
            for alt_col in range(col0, col0 + 3u8) {
                avail.remove(self.grid[alt_row][alt_col]);
            }
        }
    }
fn drop_colors ( & mut self , avail : & mut Colors , row : u8 , col : u8 ) { for idx in range ( 0u8 , 9u8 ) { avail . remove ( self . grid [ idx ] [ col ] ) ; /* check same column fields */ avail . remove ( self . grid [ row ] [ idx ] ) ; /* check same row fields */ } // check same block fields let row0 = ( row / 3u8 ) * 3u8 ; let col0 = ( col / 3u8 ) * 3u8 ; for alt_row in range ( row0 , row0 + 3u8 ) { for alt_col in range ( col0 , col0 + 3u8 ) { avail . remove ( self . grid [ alt_row ] [ alt_col ] ) ; } } }
find colors available in neighbourhood of (row, col)
find colors available in neighbourhood of ( row col )
&mut self
avail
&mut Colors
row
u8
col
u8
&mut self
avail
&mut Colors
row
u8
col
u8