Browse Source

refactoring: 4

main^2
Lucas Heil 11 months ago
committed by Peter Wiebe
parent
commit
933570c7e1
  1. 6
      src/main/c/sudoku.c

6
src/main/c/sudoku.c

@ -23,7 +23,7 @@ void Level_Pool(int difficulty);
void selectLevel(int grid[SIZE][SIZE]); void selectLevel(int grid[SIZE][SIZE]);
void initializeGrid(int grid[SIZE][SIZE]); void initializeGrid(int grid[SIZE][SIZE]);
void create_playing_field(int grid[SIZE][SIZE], int difficulty, int level); void create_playing_field(int grid[SIZE][SIZE], int difficulty, int level);
void turnFunction(int grid[SIZE][SIZE]);
void Player_actions_for_playing(int grid[SIZE][SIZE]);
void tipFunction(int grid[SIZE][SIZE]); void tipFunction(int grid[SIZE][SIZE]);
void inputFunction(int grid[SIZE][SIZE]); void inputFunction(int grid[SIZE][SIZE]);
void printGrid(int grid[SIZE][SIZE]); void printGrid(int grid[SIZE][SIZE]);
@ -248,7 +248,7 @@ void Game_loop() {
if ((difficulty >= 1 && difficulty <= 3) && input[1] == '\0') { if ((difficulty >= 1 && difficulty <= 3) && input[1] == '\0') {
Level_Pool(difficulty); Level_Pool(difficulty);
selectLevel(grid); selectLevel(grid);
turnFunction(grid);
Player_actions_for_playing(grid);
} else { } else {
printf("Invalid input. Please enter a number between 1 and 3.\n"); printf("Invalid input. Please enter a number between 1 and 3.\n");
} }
@ -316,7 +316,7 @@ void create_playing_field(int grid[SIZE][SIZE], int difficulty, int level) {
} }
void turnFunction(int grid[SIZE][SIZE]) {
void Player_actions_for_playing(int grid[SIZE][SIZE]) {
while (1) { while (1) {
printf("\nTurn function - Choose an action:\n"); printf("\nTurn function - Choose an action:\n");
printf("1. Tip function\n"); printf("1. Tip function\n");

Loading…
Cancel
Save