Visual Basic.NET
  Home arrow Visual Basic.NET arrow Create a Sudoku Puzzle Generator using VB....
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
VISUAL BASIC.NET

Create a Sudoku Puzzle Generator using VB.NET
By: Pete Rodriguez
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 15
    2008-07-29

    Table of Contents:
  • Create a Sudoku Puzzle Generator using VB.NET
  • The User Interface
  • Creating Puzzles
  • Saving and Loading Puzzles
  • Solving Puzzles
  • Printing Puzzles

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Create a Sudoku Puzzle Generator using VB.NET


    (Page 1 of 6 )

    Back in 1988, a game called Tetris became a worldwide phenomenon. At the time, I programmed my own PC version of it using Turbo Pascal. Recently, a friend of mine introduced me to Sudoku. Like Tetris, this puzzle game sparked a global fervor. I could download it for free from a number of sites, but what fun would that be? Instead, the learning experience and challenge would lie in coding it myself. Join me as I show you how to roll your own Sudoku puzzle generator.

    For those of you that have never heard of it, Sudoku is a logic-based placement puzzle that garnered early popularity in Japan. The puzzle retained its current moniker from an abbreviation of the Japanese phrase, “the digits must remain single." The puzzle is comprised of a 9x9 cell grid sub-divided into 9 3x3 regions and several of these cells, called “clues," are pre-filled with the numbers 1 to 9. As its name implies, solving the puzzle entails filling the remaining empty cells with the numbers 1 to 9 so that they appear only once in each column, row, or region. Figure 1 shows a sample puzzle. For more in-depth information and links on Sudoku, I recommend going to the increasingly popular Wikipedia at http://en.wikipedia.org/wiki/Sudoku.


    Figure 1. Screen Shot of Sudoku Generator


    Puzzle Generator Features

    I originally targeted the puzzle generator for mobile smart devices (as evident by the application’s small user interface footprint), due to the lure of playing it on my PDA or cell phone. Yet in writing this article, I decided to target the Window’s desktop so as not to convolute the review of the code with particulars about the Mobile Device API. In the near future, I’m looking forward to writing a second installment for the smart device platform. The application implements some pretty basic features. You can create new puzzles with varying degrees of difficulty, save and load them to and from disk for later enjoyment, or print them. The latter feature is especially useful if you prefer to leave your laptop at home and use a pencil to solve your puzzle the old-fashioned way. Check out the Enhancing the Puzzle Generatorsection below for some suggestions on how to further enhance the application.

    More Visual Basic.NET Articles
    More By Pete Rodriguez


     

    VISUAL BASIC.NET ARTICLES

    - Clocks and Countdowns
    - User-defined Functions using Visual Basic Ap...
    - Understanding Object Binding in VBA
    - Mastering the Message Box
    - Testing a Windows Forms Application
    - Using Visual Basic.NET Features to Code a Wi...
    - Correcting Code in a Windows Forms Applicati...
    - Write Readable Code and Comments for Windows...
    - How to Code and Test a Windows Forms Applica...
    - Adding Features to a Windows Forms Applicati...
    - How to Design a Windows Forms Application
    - LINQ to XML Programming Using Visual Basic.N...
    - Understanding Delegates using Visual Basic.N...
    - Create a Sudoku Puzzle Generator using VB.NET
    - Entity Creation and Messaging in a VB.NET Te...





    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek