| |
| |
About the Author | |
| |
| |
About the Technical Reviewer | |
| |
| |
Acknowledgments | |
| |
| |
Introduction | |
| |
| |
| |
What Is Sudoku? | |
| |
| |
Rules of Sudoku | |
| |
| |
Sudoku Terminology | |
| |
| |
It's Just Logic! | |
| |
| |
Variants of Sudoku | |
| |
| |
Let's Play Sudoku! | |
| |
| |
Summary | |
| |
| |
| |
Creating the Sudoku Application | |
| |
| |
Creating the Sudoku Project | |
| |
| |
Creating the User Interface | |
| |
| |
Declaring the Member Variables | |
| |
| |
Representing Values in the Grid | |
| |
| |
Generating the Grid Dynamically | |
| |
| |
Starting a New Game | |
| |
| |
Selecting the Numbers to Insert | |
| |
| |
Handling Click Events on the Label Controls | |
| |
| |
Undoing and Redoing a Move | |
| |
| |
Saving a Game | |
| |
| |
Opening a Saved Game | |
| |
| |
Ending the Game | |
| |
| |
Testing the Application | |
| |
| |
Summary | |
| |
| |
| |
Basic Sudoku Solving Technique | |
| |
| |
Elimination Technique | |
| |
| |
Column, Row, and Minigrid Elimination | |
| |
| |
Usefulness of the CRME Technique | |
| |
| |
Exception Scenarios | |
| |
| |
Implementing the CRME Technique | |
| |
| |
Adding Member Variables | |
| |
| |
Modifying the SetCell() Subroutine | |
| |
| |
Adding a ToolTip Control | |
| |
| |
Calculating the Possible Values for a Cell | |
| |
| |
Scanning the Grid | |
| |
| |
Wiring the Controls | |
| |
| |
Testing It Out | |
| |
| |
Summary | |
| |
| |
| |
Intermediate Techniques | |
| |
| |
Lone Rangers | |
| |
| |
Lone Rangers in a Minigrid | |
| |
| |
Lone Rangers in a Row | |
| |
| |
Lone Rangers in a Column | |
| |
| |
Implementing the Technique | |
| |
| |
Looking for Lone Rangers in Minigrids | |
| |
| |
Looking for Lone Rangers in Rows | |
| |
| |
Looking for Lone Rangers in Columns | |
| |
| |
Modifying the SolvePuzzle() Function | |
| |
| |
Testing Out the Lone Ranger Technique | |
| |
| |
Example 1 | |
| |
| |
Example 2 | |
| |
| |
Summary | |
| |
| |
| |
Advanced Techniques | |
| |
| |
Looking for Twins | |
| |
| |
Looking for Triplets | |
| |
| |
Variants of Triplets | |
| |
| |
Brute-Force Elimination | |
| |
| |
Implementing the Techniques | |
| |
| |
Looking for Twins in Minigrids | |
| |
| |
Looking for Twins in Rows | |
| |
| |
Looking for Twins in Columns | |
| |
| |
Looking for Triplets in Minigrids | |
| |
| |
Looking for Triplets in Rows | |
| |
| |
Looking for Triplets in Columns | |
| |
| |
Modifying the SolvePuzzle() Function | |
| |
| |
Using Brute-Force Elimination | |
| |
| |
Modifying the Code Behind for the Solve Puzzle Button | |
| |
| |
Testing the Techniques | |
| |
| |
Summary | |
| |
| |
| |
Generating Sudoku Puzzles | |
| |
| |
Determining the Level of Difficulty | |
| |
| |
Steps to Generate a Sudoku Puzzle | |
| |
| |
Determining the Locations of Empty Cells | |
| |
| |
Single-Solution Puzzles | |
| |
| |
Implementing the Puzzle-Generating Algorithm | |
| |
| |
Creating the Class | |
| |
| |
Randomizing the List of Possible Values | |
| |
| |
Generating a New Puzzle | |
| |
| |
Creating Empty Cells in the Grid | |
| |
| |
Vacating Another Pair of Cells | |
| |
| |
Exposing the GetPuzzle() Function | |
| |
| |
Wiring Up the Logic with the User Interface | |
| |
| |
Testing the Implementation | |
| |
| |
Easy Puzzles | |
| |
| |
Medium Puzzles | |
| |
| |
Difficult Puzzles | |
| |
| |
Extremely Difficult Puzzles | |
| |
| |
Summary | |
| |
| |
| |
How to Play Kakuro | |
| |
| |
The Rules | |
| |
| |
Solving a Kakuro Puzzle | |
| |
| |
Tips for Solving Kakuro Puzzles | |
| |
| |
Summary | |
| |
| |
| |
The SudokuPuzzle Class | |
| |
| |
Index | |