summaryrefslogtreecommitdiff
path: root/src/cell.cc
blob: 31754b75db4ddd6f2479e4b7cfe4bfadd6f5f979 (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
29
30
31

#include "cell.h"

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;
}