The stupid question is the question not asked | |
PerlMonks |
Game of Lifeby jimt (Chaplain) |
on Sep 21, 2006 at 18:47 UTC ( [id://574225]=obfuscated: print w/replies, xml ) | Need Help?? |
I don't know if this would be considered an obfuscation or a golfing exercise, but nonetheless, in only 451 characters, I present you with John Conway's Game Of Life.
Update - Using a few tricks I picked up from teamster_jr's wonderful version below (and a few golf tricks I always seem to forget to implement, I knocked it down to 366 characters.
Final update - by eliminating a few niceties (printing the generation number, allowing the program to terminate by itself), and accidentally creating a fractal, I chopped it down to 282 characters (not counting new lines).
Final, final update Fine, fine, since this node is still getting some play and I have continued to tinker with it, here's a 270 character version. How low can I go, indeed.
Now on to other things. <Reveal this spoiler or all in this thread>
Back to
Obfuscated Code
|
|