April 15, 2010

Tutorial: Concentration

Another 80-line javascript tutorial: concentration.html (view source) lets you test your memory by trying to find pairs of symbols. When you miss a pair, it flips them back to black after a second. How well can you do?

The program is an example of a very simple state machine with three states: none chosen, a first item is chosen, and a second item is chosen.

For symbols the game uses a bunch of cute and cryptic Unicode glyphs. This works fine on Windows with its Unicode Times New Roman font. Let me know if this is problematic on other platforms.

Posted by David at April 15, 2010 01:41 AM
Comments
Post a comment









Remember personal info?