|
|
@ -9,7 +9,6 @@ |
|
|
|
#include <stdbool.h> |
|
|
|
#include <string.h> |
|
|
|
|
|
|
|
|
|
|
|
#define SIZE 9 |
|
|
|
#define EMPTY 0 |
|
|
|
#define LEVEL_NUMBER 3 |
|
|
@ -20,7 +19,7 @@ int selected_level; |
|
|
|
|
|
|
|
|
|
|
|
void startSudoku(); //is instead of main |
|
|
|
void availableLevelsFunction(int difficulty); |
|
|
|
void Level_Pool(int difficulty); |
|
|
|
void selectLevel(int grid[SIZE][SIZE]); |
|
|
|
void initializeGrid(int grid[SIZE][SIZE]); |
|
|
|
void generateSudoku(int grid[SIZE][SIZE], int difficulty, int level); |
|
|
@ -247,7 +246,7 @@ void startSudoku() { |
|
|
|
difficulty = input[0] - '0'; // Convert the first character to an integer |
|
|
|
|
|
|
|
if ((difficulty >= 1 && difficulty <= 3) && input[1] == '\0') { |
|
|
|
availableLevelsFunction(difficulty); |
|
|
|
Level_Pool(difficulty); |
|
|
|
selectLevel(grid); |
|
|
|
turnFunction(grid); |
|
|
|
} else { |
|
|
@ -257,7 +256,7 @@ void startSudoku() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void availableLevelsFunction(int difficulty) { |
|
|
|
void Level_Pool(int difficulty) { |
|
|
|
printf("\nAvailable Levels for Difficulty %d:\n", difficulty); |
|
|
|
for (int i = 0; i < LEVEL_NUMBER; i++) { |
|
|
|
printf("%d. Level %d\n", i + 1, i + 1); |
|
|
|