Archive for February, 2009

JAGS 10K, Platinum Edition

Thursday, February 12th, 2009

There’s still time to vote in the Mix 10K Challenge

Voting closes on Monday, February 16, 2009.  If you haven’t yet voted, check it out.  You simply rate the entries on a scale of 1 to 5.  Feel free to start with my JAGS 10K entry (Just Another Game of Sudoku in 10K).  😀

A New Release of JAGS 10K is Now Available

On my recent return flight from San Antonio, I had the opportunity to tackle one of the toughest games of Sudoku yet.  Only 20 cells were given.  A typical "hard" puzzle gives you at least 25.

Naturally, I decided to attempt it within JAGS 10K (using the super secret method of loading a custom puzzle described in my previous post).  Afterall, every developer should eat his own dogfood!

This attempt revealed that the golden release of JAGS 10K is lacking in a very key feature.  Namely, there is no way to make visual cues within a cell.  Most Sudoku players rely on these marks when solving a puzzle on paper.  Without this ability on the computer, solving a tough puzzle is nearly impossible (unless you’re Dr. Spencer Reid from CBS’s Criminal Minds… yes, I’m a fan).

Clearly, I had some work to do!  As such, I took some time this past weekend to add the required new feature and I’m happy to say that the new release is now available for installation here.

Previous Features

All of the original features are still there.  You can play an auto-generated puzzle of a specific difficulty or you can load a puzzle from the web.

Mouse Play:  Some people commented on the lack of discoverability for mouse play.  Unfortunately, 10K does not afford you any room for including instructions within the app and the stock cursors just don’t do it for this particular user interaction.  So here’s the mouse play secret again… simply click on a cell and then drag down (or right) to increase the number and up (or left) to decrease it.  (Designers:  If it helps, I’ve been told by a few people that this is similar to how Blend’s property editor works for numerical properties.)

New Features

In JAGS 10K, Version 2.0, you can now hold down the Ctrl key to reveal visual cues that can then be toggled on or off, as seen here:

When you release the Ctrl key, you will see only the markers that are toggled on:


Now you can truly solve any level of puzzle! 

To make it even better, I added a more accessible way to specify a custom puzzle.  Now you can simply pass the gameboard as a URL parameter.  This allows you to easily share a puzzle with your friends.  In fact, if you’d like to take a crack at it, here is that tough puzzle from my return flight:

Enjoy! It took me nearly an hour to solve!  Maybe you can beat me.

I also fixed a bug or two in the app and I added a minimize button (per Mladen’s suggestion in the comments for my official entry), so you can quickly hide the game if your boss walks in to your office! 😉

Code Size

So I’m sure you’re asking, "What did these enhancements do to the size of the code?"  As you might expect, it increased it quite a bit.  The size of the code actually went up by about 20 percent!

My first inclination was to simply release the updated version as "JAGS 12K".  But alas, if you can’t play by the rules, you shouldn’t play at all!  So I’ve spent the last several nights getting extremely creative in the code.  I’m happy to say that the code for this v.2 release is now once again 10K (exactly 10,240 bytes, to be precise).

Source Code

If you saw my original post, you know that it took a lot of work to get down to 10K in the first place.  Explaining my latest tricks would take too long, so I’ve decided to instead just post the code for anyone who is really that interested.  You can download the project hereCaution: Don’t expect it to be very legible!

JAGS 10K has been posted

Thursday, February 5th, 2009

My aforementioned Mix10K entry has now been posted.  Please check it out, give it a rating, and let me know what you think.

I have just uploaded several new games, including some from The New York Times, The LA Times, and The Hindu (in honor of my original introduction to Sudoku).  I even included the puzzles from my recent flight to San Antonio (just because I could :D).

If you’re not into the syndicated games, you can also play auto-generated games at the difficulty level you select.

Enjoy your game!

Secret Bonus Feature for Hardcore Sudoku Players

I allow you to specify a gameboard on the command line.  This requires you to locate the executable file, jags.exe, in the click once application cache (C:\Users\[ProfileName]\AppData\Local\Apps\2.0\[obscure path]\jags.exe).  Simply pass an 81-character string of digits on the command line. Each 9-digit substring represents a row of the puzzle. Zeros (0s) represent empty cells.

If you actually use this feature, you may indeed have a problem.  Consider joining Sudokuholics Anonymous.  Maybe I’ll see you there!