[ Preface  ]
[ About Me ]
[ Software ]
[ Puzzles  ]
[ More...  ]

About the Fifteen puzzle

The Fifteen puzzle is attributed to the famous puzzle expert Samuel Loyd, who invented thousands of mathematical puzzles in the 19-th century.

Read more and more about this puzzle.

How I wrote it

This is a really small game, so I did it all in several hours. First I created 15 images using a perl script. Then I wrote the actual html and javascript.

I needed to implement my own pseudo-randomness for scrambling. As you may already know, there are 2 distinct sets of positions in this game that may be called even and odd. Valid scrambling may be implemented either by a large number of random valid moves or by an even number of random piece switchings.

I also wanted this game to be playable in all javascript-enabled browsers. I tested it in all browsers I have, Netscape 3, Konqueror, Opera, Mozilla (it was created long before Firefox existed, but Firefox is just fine too). I got reports that the game works in Safari, Internet Explorer and AOL browser as well.