As some of you know, I have an affinity for programming the 'Lights Out' game. For those who don't remember it, here's a summary: You are presented with a grid, say 4x4, of squares, some white, some black. The objective is to turn them all black in the shortest number of moves. When you click on a square, that square and squares horizontally and vertically adjacent to that square turn to the opposite color.
It's an old game. I remember playing with it when I was in elementary school. It was in the AG (academically gifted) class. The game was a part of another game. We, students as a group, got about five tries to turn all lights out. After that, we had to solve a few math problems before getting five more tries. The memory takes me back, but making the game does not.
If I've programmed it before, what's new? Before, it was only a Windows application. The major limitation was that it had only a 3x3 grid. In this 'new' version, the user can choose the grid's size.
I programmed this in my spare time while waiting for a few basketball games to begin (I work stats at the games). It was just to waste time beforehand, but I then became intrigued because I discovered my JavaScript and programming skills increased enough where I didn't need an editor to tell me of errors or proper procedure. This is from memory, all by hand in notepad.
I will 'fix' it later to prevent people from stealing the script. It's so easy to do. Anyway, play it here until I add AJAX to it and make sure no one can steal it.