summaryrefslogtreecommitdiff
path: root/src/cell.h
blob: e81a7c4d4f0a6bf005c987fe0da32a98ee192393 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

#ifndef __INCLUDED_SUDOKUSOLVER_CELL__
#define __INCLUDED_SUDOKUSOLVER_CELL__

class Cell {
	
public:
	Cell();
	Cell(const Cell & other);
	
	void assign(const Cell & other);
	
	// inspector
	inline int value() const { return cell_value; }

	inline int possibility(const int value) { return cell_possibility[value]; }
	
	// mutator
	void set_value(int value);
	
	void set_possibility(int value, bool possible = true);
	
private:
	int cell_value;
	bool cell_possibility[9];
};

#endif // __INCLUDED_SUDOKUSOLVER_CELL__