From 44006abac0169346d67a6de31f6fe0793ead0a09 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 30 Sep 2012 11:43:36 +0000 Subject: Added validity test, API cleanup. --- src/cell.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/cell.cc') diff --git a/src/cell.cc b/src/cell.cc index 31754b7..c586a73 100644 --- a/src/cell.cc +++ b/src/cell.cc @@ -4,6 +4,7 @@ Cell::Cell() { cell_value = 0; + cell_valid = true; } Cell::Cell(const Cell & other) @@ -13,7 +14,9 @@ Cell::Cell(const Cell & other) void Cell::assign(const Cell & other) { + cell_valid = other.cell_valid; cell_value = other.cell_value; + cell_valid = other.cell_valid; for (int i = 0; i < 9; i++) { cell_possibility[i] = other.cell_possibility[i]; @@ -29,3 +32,8 @@ void Cell::set_possibility(int value, bool possible) { cell_possibility[value] = possible; } + +void Cell::set_valid(bool valid) +{ + cell_valid = valid; +} -- cgit v1.2.3