iPhone Sudoku

Tools

iPhone Sudoku

Ever since attending the iPhone development session at WWDC last month, I’ve been itching to build my first web site for Apple’s new device. Tonight I took some time off and set out to see what I could come up with. I gave myself a time limit: two hours. I wanted to build something that could really take advantage of the iPhone’s touch screen. It also needed to be lightweight enough to load quickly on AT&T’s Edge network. After a short brainstorming session I decided to give Sudoku a try.

I must say, it turned out great.

The whole site is a single page. I use PHP to generate the puzzle and Javascript to drive the interface. The Sudoku grid completely fills up the iPhone’s view port. Tapping on a square with your finger opens a pop-up that mimics the phone’s dialpad. Tap a number 1 through 9 to insert it into the square. You can refresh the page to get a new puzzle. And since everything is self-contained using Javascript, once you load the page you no longer need a network connection to play. You can take the puzzle with you on a plane or down in the subway where there’s little reception.

There’s still work to be done. I need to add a “cheat mode” that will tell you if a number you enter is incorrect. Also, a few animations / transitions would help blend the site in with the iPhone’s animated interface. But, as it stands, the site works just fine. Head on over and let me know what you think.

http://clickontyler.com/sudoku/

Comments are closed on this post