diff options
Diffstat (limited to 'src/cell.cc')
-rw-r--r-- | src/cell.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/cell.cc b/src/cell.cc index c5af933..31754b7 100644 --- a/src/cell.cc +++ b/src/cell.cc @@ -5,8 +5,27 @@ Cell::Cell() { cell_value = 0; } + +Cell::Cell(const Cell & other) +{ + assign(other); +} + +void Cell::assign(const Cell & other) +{ + cell_value = other.cell_value; + + for (int i = 0; i < 9; i++) { + cell_possibility[i] = other.cell_possibility[i]; + } +} void Cell::set_value(int value) { cell_value = value; } + +void Cell::set_possibility(int value, bool possible) +{ + cell_possibility[value] = possible; +} |