diff --git a/sudoku-rust/src/grid/reduce.rs b/sudoku-rust/src/grid/reduce.rs index e8129f5..bf828cf 100644 --- a/sudoku-rust/src/grid/reduce.rs +++ b/sudoku-rust/src/grid/reduce.rs @@ -52,6 +52,17 @@ pub fn reduce(original: PlayingGrid, action: &Action) -> Result for PlayingCell { } } +impl Index for Note { + type Output = bool; + + fn index(&self, index: SudokuCell) -> &Self::Output { + &self.0[(Into::::into(index) - 1) as usize] + } +} + impl Note { #[must_use] pub fn toggle(&self, value: SudokuCell) -> Self {