-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsudoku.h
32 lines (25 loc) · 977 Bytes
/
sudoku.h
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
#ifndef SUDOKU_H_INCLUDED
#define SUDOKU_H_INCLUDED
#include <math.h>
#define SUDOKU_SIZE 9
#define SUDOKU_SEPERATOR ((int)sqrt(SUDOKU_SIZE))
#define SUDOKU_BOARD_SIZE (SUDOKU_SIZE * SUDOKU_SIZE)
#define HCONSOLE GetStdHandle(STD_OUTPUT_HANDLE)
typedef struct SudokuField
{
int value;
int isEditable;
} SudokuField;
typedef struct Cursor
{
int x;
int y;
} Cursor;
void generateSudoku(SudokuField arraySudoku[][SUDOKU_SIZE], int difficulty);
void fill_sudoku(SudokuField arraySudoku[SUDOKU_SIZE][SUDOKU_SIZE]);
void print_sudoku(SudokuField arraySudoku[SUDOKU_SIZE][SUDOKU_SIZE], Cursor Cursor, char message[]);
int check_sudoku(SudokuField arraySudoku[SUDOKU_SIZE][SUDOKU_SIZE]);
void set_editable(SudokuField arraySudoku[SUDOKU_SIZE][SUDOKU_SIZE]);
void import_to_sudoku(SudokuField arraySudoku[SUDOKU_SIZE][SUDOKU_SIZE], int arrayImport[]);
void check_and_move_sudoku_cursor(Cursor *cursor);
#endif // SUDOKU_H_INCLUDED