File: sudoku.H

package info (click to toggle)
gnudoq 0.94-2.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 2,696 kB
  • ctags: 232
  • sloc: cpp: 2,695; makefile: 6
file content (38 lines) | stat: -rw-r--r-- 611 bytes parent folder | download | duplicates (4)
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
/*
* This code is released under the GNU General Public License.  See COPYING for
* details.  Copyright 2005 P. Jordan
* pmjordan@gmx.at
*/

#pragma once
#ifndef SUDOKU_H
#define SUDOKU_H

namespace sudoku
{

	class Sudoku
	{
		public:
		struct attempt
		{
			int value;
			int tries;
			int index;
			int row, col, box;
		};

		struct flags
		{
			char row[9][9];
			char col[9][9];
			char box[9][9];
		};

		static int solve(attempt stack[], int top, flags *flags, char visited[]);
		static int pint(const attempt stack[], const char visited[]);
		static int blank(char visited[], int blanks);
	};
}

#endif