Browse Source

refactoring: 6

main^2
Lucas Heil 11 months ago
committed by Peter Wiebe
parent
commit
80b3b3711e
  1. 8
      src/main/c/sudoku.c

8
src/main/c/sudoku.c

@ -25,7 +25,7 @@ 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 Player_actions_for_playing(int grid[SIZE][SIZE]); void Player_actions_for_playing(int grid[SIZE][SIZE]);
void giving_hints_to_player(int grid[SIZE][SIZE]); void giving_hints_to_player(int grid[SIZE][SIZE]);
void inputFunction(int grid[SIZE][SIZE]);
void write_userinput_into_Sudoku(int grid[SIZE][SIZE]);
void printGrid(int grid[SIZE][SIZE]); void printGrid(int grid[SIZE][SIZE]);
void doneFunction(int grid[SIZE][SIZE]); void doneFunction(int grid[SIZE][SIZE]);
@ -320,7 +320,7 @@ 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. Hints\n"); printf("1. Hints\n");
printf("2. Input function\n");
printf("2. Insert Number into Game\n");
printf("3. Print Sudoku grid\n"); printf("3. Print Sudoku grid\n");
printf("4. Done function\n"); printf("4. Done function\n");
printf("5. Select level\n"); printf("5. Select level\n");
@ -346,7 +346,7 @@ void Player_actions_for_playing(int grid[SIZE][SIZE]) {
giving_hints_to_player(grid); giving_hints_to_player(grid);
break; break;
case 2: case 2:
inputFunction(grid);
write_userinput_into_Sudoku(grid);
break; break;
case 3: case 3:
printGrid(grid); printGrid(grid);
@ -456,7 +456,7 @@ void giving_hints_to_player(int grid[SIZE][SIZE]) {
} }
} }
void inputFunction(int grid[SIZE][SIZE]) {
void write_userinput_into_Sudoku(int grid[SIZE][SIZE]) {
printf("\nInput function - Choose an action:\n"); printf("\nInput function - Choose an action:\n");
printf("1. Insert value in an empty field\n"); printf("1. Insert value in an empty field\n");
printf("2. Clear an already filled field\n"); printf("2. Clear an already filled field\n");

Loading…
Cancel
Save