Here is the Tcl code for the puzzle.
If you have the Tcl plugin you can play the puzzle on your brouser.