PDA

View Full Version : lights out game



sandyrepope
06-12-2007, 04:12
I just found out about a game that is new to me. It's called lights out and from what little information I was able to find by a search it wouldn't be too hard to program.

The basic idea is that the playing board is made up of 25 lights arranged in 5 rows of 5 lights each. The idea of the game is that some of the lights are on and some are off. The object is to click on different lights until all lights are off. When a light is clicked on it's state is switched, if it was on then it is turned off, if it was off then it is turned on. The catch is that when a light is clicked on then the four lights surrounding it have their state reset also. (north, south, east and west of the light that was clicked on).

What I haven't been able to find out is if the boards use predefined patterns or some kind of random patterns.
Anyone know about this?

Thanks
Sandy

sandyrepope
12-12-2007, 04:58
What I haven't been able to find out is if the boards use predefined patterns or some kind of random patterns.
Thanks to webopedia I've found the answer to my question. According to the article on the game Lights out! both patterns and random one are used.

When I finally write a script to play the game I'll use both patterns I make and some random ones too.

Thanks
Sandy

Michael Hartlef
12-12-2007, 08:23
I'm curios about it and looking forward to your game.

Michael Clease
12-12-2007, 10:05
Here you go Mike

http://www.haar.clara.co.uk/Lights/JS/lout.html

Michael Hartlef
12-12-2007, 11:49
Thanks for the link!

Petr Schreiber
12-12-2007, 13:43
Very nice game,

I have it on my calculator too.
Simple principle, but some boards take lot of time to complete :)

Bye,
Petr

sandyrepope
12-12-2007, 16:41
I have it on my calculator too.I've never seen one that had this game on it. Sounds interesting. What kind of calculator is it?

Thanks
Sandy

Petr Schreiber
12-12-2007, 21:55
Hi Sandy,

it is my beloved "killer granny" HP-42s from 1987 :)
See program and how it looks here: http://www.hp42s.com/programs/okiedokie/okiedokie.html
Calculator itself looks like that: http://www.hpmuseum.org/3qs/42s3q.jpg

Game is called Okie Dokie, but the principle is very similar / same.


Bye,
Petr

kryton9
12-12-2007, 22:16
Nice screenshots Petr.

That is a very tough game... I got it down to 2 squares and that is about the best I can do :)

Michael Hartlef
13-12-2007, 07:59
I was never being able to finish it. Frustrating game.