Browse Source

Commit 32 code

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

6
src/main/c/sudoku.c

@ -30,6 +30,7 @@ void printGrid(int grid[SIZE][SIZE]);
void doneFunction(int grid[SIZE][SIZE]); void doneFunction(int grid[SIZE][SIZE]);
int availableLevels[3][3][SIZE][SIZE] = { int availableLevels[3][3][SIZE][SIZE] = {
{ //easy { //easy
{{0, 0, 3, 0, 2, 1, 8, 0, 0}, {{0, 0, 3, 0, 2, 1, 8, 0, 0},
@ -50,7 +51,7 @@ int availableLevels[3][3][SIZE][SIZE] = {
{1, 0, 0, 4, 0, 6, 0, 0, 0}, {1, 0, 0, 4, 0, 6, 0, 0, 0},
{2, 9, 0, 8, 1, 5, 0, 0, 6}, {2, 9, 0, 8, 1, 5, 0, 0, 6},
{0, 4, 8, 2, 0, 9, 5, 0, 0}, {0, 4, 8, 2, 0, 9, 5, 0, 0},
{5, 0, 0, 7, 0, 3, 2, 0, 0}},
{5, 0, 0, 7, 0, 3, 2, 0, 2}},
{{0, 0, 3, 0, 2, 1, 8, 0, 0}, {{0, 0, 3, 0, 2, 1, 8, 0, 0},
{6, 0, 0, 0, 7, 0, 1, 3, 2}, {6, 0, 0, 0, 7, 0, 1, 3, 2},
@ -322,6 +323,7 @@ void turnFunction(int grid[SIZE][SIZE]) {
printf("2. Input function\n"); printf("2. Input function\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");
int action; int action;
@ -352,7 +354,7 @@ void turnFunction(int grid[SIZE][SIZE]) {
doneFunction(grid); doneFunction(grid);
break; break;
case 5: case 5:
printf("Case 5.\n");
selectLevel(grid);
break; break;
case 6: case 6:
printf("Case 6.\n"); printf("Case 6.\n");

Loading…
Cancel
Save