-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
36 lines (35 loc) · 855 Bytes
/
main.c
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
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "Game.h"
#include "Parser.h"
#include "SPBufferset.h"
#include "MainAux.h"
#include "List.h"
#include "Solver.h"
#include "Stack.h"
#include "FilesAux.h"
#include "Solver.h"
int main() {
srand(time(0));
state = Init;
global_mark_errors = 1;
print_start_program();
while (1){
printf("Please enter a command:\n");
interpret_command();
if(state == Solve){
if(check_board_solved()){
if(check_erroneous_board()){
printf("The solution is erroneous!\n");
}
else{
printf("The puzzle was solved successfully!\n");
restart_to_init();
}
}
} else if (state == Edit){
}
}
return 0;
}