1 |
torben |
226 |
#pragma once
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
class Sudoku
|
7 |
|
|
{
|
8 |
|
|
public:
|
9 |
|
|
Sudoku(void);
|
10 |
|
|
~Sudoku(void);
|
11 |
|
|
|
12 |
|
|
void setNumber(int x, int y, int number);
|
13 |
|
|
int getNumber(int x, int y);
|
14 |
|
|
void clear();
|
15 |
|
|
bool solve();
|
16 |
|
|
CString print_matrix();
|
17 |
|
|
bool getUser(int x, int y);
|
18 |
|
|
|
19 |
|
|
void clearCalculated(void);
|
20 |
|
|
private:
|
21 |
|
|
static const int matrixSize = 9;
|
22 |
|
|
|
23 |
|
|
int matrix[9][9];
|
24 |
|
|
bool user_matrix[9][9];
|
25 |
|
|
|
26 |
|
|
bool checkrow(int x, int y, int tal);
|
27 |
|
|
bool checkcol(int x, int y, int tal);
|
28 |
|
|
bool checkbox(int x, int y, int tal);
|
29 |
|
|
bool solve(int x, int y);
|
30 |
|
|
|
31 |
|
|
void initCheck(void);
|
32 |
|
|
};
|