summaryrefslogtreecommitdiff
path: root/src/cell.cc
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-07-25 18:47:14 +0000
committerStijn Buys <ingar@osirion.org>2012-07-25 18:47:14 +0000
commit6d6801d4779266b0eb062120525ef76510e76e3c (patch)
treea8e3ef7d9f64f98a64c9b9801cff0987de6d0b3c /src/cell.cc
parent1c993ec2cd1a57a1d8f29c868f1638cc2f4571b3 (diff)
Added initial coverage solver.
Diffstat (limited to 'src/cell.cc')
-rw-r--r--src/cell.cc19
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;
+}