April 09, 2010

Tutorial: Mastermind

Terran implemented a nice 80-line Mastermind implementation in javascript here.

It is a pretty interesting example, and I like it a lot. In an attempt to simplify it, I made a jquery version of it here: mastermind.html (view source). The jquery version has a slightly different flavor - less string-hacking and more conceptual stuff.

Unfortunately, I do not think the jquery conversion makes the code easier to understand for a beginner. It uses too many idioms and so it is probably harder.

But maybe it is useful as an advanced example some jquery and javascript tricks. What do you think? Is there a simpler way?

Posted by David at April 9, 2010 10:42 AM
Comments
Post a comment









Remember personal info?