From 9b82e566b648d530df7e3fac61cc2e5b694fa24e Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Fri, 15 Jun 2012 18:51:56 +0000 Subject: Added Cell class. --- src/cell.cc | 12 ++++++++++++ src/cell.h | 20 ++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 src/cell.cc create mode 100644 src/cell.h (limited to 'src') 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__ -- cgit v1.2.3