-
Notifications
You must be signed in to change notification settings - Fork 0
/
parser.h
38 lines (33 loc) · 1.46 KB
/
parser.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
33
34
35
36
37
38
#ifndef SUDOKU_C_PARSER_H
#define SUDOKU_C_PARSER_H
#define MoreWords (token!=NULL)
#define delimiter " \t\n"
#define DEBUG_MSG(i) printf("I'm here~! %d\n",(i));
#define EXIT_MSG1 printf("Exiting...\n")
#define EXIT_MSG2(func) printf("Error: %s has failed\n", (func))
#define ERROR_MSG1 printf("Error: cell is fixed\n")
#define ERROR_MSG3 printf("Error: invalid command\n")
#define WIN_MSG printf("Puzzle solved successfully\n")
#define HINT_MSG(clue) printf("Hint: set cell to %d\n",clue)
#define VAL_FAIL_MSG printf("Validation failed: board is unsolvable\n")
#define VAL_PASS_MSG printf("Validation passed: board is solvable\n")
#include "DS.h"
#include <stdio.h>
#include <string.h>
enum cmd_name {e_solve, e_edit, e_mark_errors, e_print_board, e_set, e_validate, e_guess, e_generate, e_undo, e_redo,
e_save, e_hint, e_guess_hint, e_num_solutions, e_autofill, e_reset, e_exit, e_unknown} cmd_name;
typedef struct commands{
enum cmd_name name ;
char* address ;
int x ;
int y ;
int z ;
float f ;
} cmd;
enum cmd_name checkCommand(char* command) ;
void clear () ;
int get_command (Sudoku **board, Sudoku **solvedBoard);
int notInRange (int num, int min, int max) ;
/*Omer fix*/
#include "game.h"
#endif