blob: 21b75608d175c7b1e74e96a72256d91fc72b64b7 (
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
32
33
34
35
36
37
38
|
#include "cell.h"
Cell::Cell()
{
cell_value = 0;
cell_valid = true;
}
Cell::Cell(const Cell & other)
{
assign(other);
}
void Cell::assign(const Cell & other)
{
cell_valid = other.valid();
cell_value = other.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;
}
void Cell::set_valid(bool valid)
{
cell_valid = valid;
}
|