Project 13 : Sudoku
Due Saturday at 5:00 PM MST
The final part of the Sudoku Program project is to enforce the rules of Sudoku. This means that there can be only one instance of a given number on a row, column, or inside square.
Where is your board located? prj4.txt Options: ? Show these instructions D Display the board E Edit one square S Show the possible values for a square Q Save and Quit A B C D E F G H I 1 7 2 3| |1 5 9 2 6 |3 2| 8 3 8 | 1 | 2 -----+-----+----- 4 7 |6 5 4| 2 5 4|2 7|3 6 5 |9 3 1| 4 -----+-----+----- 7 5 | 7 | 3 8 4 |1 3| 6 9 9 3 2| |7 1 4 > s What are the coordinates of the square: b2 The possible values for 'B2' are: 1, 4, 9 > e What are the coordinates of the square: b2 What is the value at 'B2': 2 ERROR: Value '2' in square 'B2' is invalid > q What file would you like to write your board to: deleteMe.txt
Perhaps the easiest way to do this is in a four-step process:
- Start with the code written in Project 12.
- Fix any necessary bugs.
- Verify your solution with testBed:
testBed cs124/project13 project13.cpp
- Submit it with "Project 13, Sudoku" in the program header.
An executable version of the project is available at:
/home/cs124/projects/prj13.out
Grading
The grading criteria are:
Exceptional 100% |
Good 90% |
Acceptable 70% |
Developing 50% |
Missing 0% |
|
---|---|---|---|---|---|
Modularization 20% |
All modules at "functional cohesion" and loose coupling | One minor cohesion or coupling error | One bug calling a function or unnecessary data passed between functions | Multiple functions exist in the project | Only one function used |
Edits 10% |
Program is robust to user errors | All edits are perfectly handled | One edit is correctly handled | Program is interactive | No UI |
Rules 40% |
Code is elegant and well thought out | Able to enforce all the rules of the game | Attempts were made to enforce game rules | No rule enforcement | |
Display 20% |
Program passes testBed |
Looks correct on screen but there are cosmetic test bed errors | Data from the board is rendered on screen | An attempt was made to do all parts of the project | Program output does not resemble the problem definition |
Style 10% |
Great variable names, no errors, great comments | Zero style checker errors | A few style checker errors | Misleading variable names or gross style errors | Little effort was spent on style |
Extra Credit
You can earn extra credit with the following:
- "Robust" error checking.
Every possible input or board configuration is handled.
For example, the user could type
"e5"
or"5E"
to specify a square. Also, the board is validated on open to ensure it is a valid board This means ensuring that there is no more than one instance of each value in a given row, column, or inside square. This is for a maximum of 10% extra credit - Differentiate read-only values (the ones provided by the board that the user cannot change)
and read/write values (the ones the user entered).
Read-only text will be rendered in green.
The following example outputs green text for the word "green"
cout << "This text is \E[22;32m green \E[0m but not the rest.\n";
To get 10% credit, you must preserve the number through a file save.
Submit extra credit attempts to "Project Extra" instead of "Project 13"
and use cs124/extraCredit
for the test bed.
Alternative to the Final
You can earn 100% on the final exam if you add an option to solve any board. There is no test-bed for this option; please submit those attempts to "Project Final". To get 85% on the final exam, you need to solve a simple board. To get 100%, you need to solve a much harder board. The boards to solve, solutions, and corresponding grades are:
Board to solve | Solution to board | Grade |
---|---|---|
/home/cs124/projects/prjFinal85.txt | /home/cs124/projects/prjFinal85Solution.txt | 85% |
/home/cs124/projects/prjFinal90.txt | /home/cs124/projects/prjFinal90Solution.txt | 90% |
/home/cs124/projects/prjFinal100.txt | /home/cs124/projects/prjFinal100Solution.txt | 100% |