summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-06-15 18:51:56 +0000
committerStijn Buys <ingar@osirion.org>2012-06-15 18:51:56 +0000
commit9b82e566b648d530df7e3fac61cc2e5b694fa24e (patch)
tree2c92f4331028dbd5194b745b13ffe49020b468eb
parent8bcb14cc56106861c61f53a5f130fc769cc1973a (diff)
Added Cell class.
-rw-r--r--src/cell.cc12
-rw-r--r--src/cell.h20
2 files changed, 32 insertions, 0 deletions
diff --git a/src/cell.cc b/src/cell.cc
new file mode 100644
index 0000000..c5af933
--- /dev/null
+++ b/src/cell.cc
@@ -0,0 +1,12 @@
+
+#include "cell.h"
+
+Cell::Cell()
+{
+ cell_value = 0;
+}
+
+void Cell::set_value(int value)
+{
+ cell_value = value;
+}
diff --git a/src/cell.h b/src/cell.h
new file mode 100644
index 0000000..5b38403
--- /dev/null
+++ b/src/cell.h
@@ -0,0 +1,20 @@
+
+#ifndef __INCLUDED_SUDOKUSOLVER_CELL__
+#define __INCLUDED_SUDOKUSOLVER_CELL__
+
+class Cell {
+
+public:
+ Cell();
+
+ // inspector
+ inline int value() const { return cell_value; }
+
+ // mutator
+ void set_value(int value);
+
+private:
+ int cell_value;
+};
+
+#endif // __INCLUDED_SUDOKUSOLVER_CELL__