Skip to content

Programming Sudoku

Best in textbook rentals since 2012!

ISBN-10: 1590596625

ISBN-13: 9781590596623

Edition: 2006

Authors: Wei-Meng Lee

List price: $24.99
Blue ribbon 30 day, 100% satisfaction guarantee!
Rent eBooks
what's this?
Rush Rewards U
Members Receive:
Carrot Coin icon
XP icon
You have reached 400 XP and carrot coins. That is the daily max!

Description:

I was fascinated with Wei-Meng Lee's book on Sudoku programming. My interest stemmed from the subject matter, Sudoku, and the way in which Wei-Meng Lee structured his book. - Thomas Wagner, wagnerblog.com Sudoku is the wildly popular new puzzle game. Sudoku puzzles are 9x9 grids, and each square in the grid consists of a 3x3 subgrid called a region. Your goal is to fill in the squares so that each column, row, and region contains the numbers 1 through 9 exactly once. And some squares already contain numbers or symbols, which lend clues toward the solution. Programming Sudokuprovides you with great approaches to building and solving Sudoku and other similar puzzles. Using ingenious…    
Customers also bought

Book details

List price: $24.99
Copyright year: 2006
Publisher: Apress L. P.
Publication date: 3/16/2006
Binding: Paperback
Pages: 232
Size: 7.00" wide x 9.00" long x 0.75" tall
Weight: 0.990
Language: English

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