From b918a40c3bb57463aed6e43edc9c5467aeb3a17b Mon Sep 17 00:00:00 2001 From: Lucas Heil Date: Wed, 7 Feb 2024 17:32:07 +0100 Subject: [PATCH] refactoring: 1 --- src/main/c/sudoku.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/c/sudoku.c b/src/main/c/sudoku.c index 6ea434e..1b0827d 100644 --- a/src/main/c/sudoku.c +++ b/src/main/c/sudoku.c @@ -9,7 +9,6 @@ #include #include - #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);