Re: My Conway's Game Of Life Attemptby eric256 (Parson)
|on Jan 04, 2010 at 17:18 UTC
Hey i was reading your post and thought that there might be a clearer way to save that data so i came up with the following. I started with your code then adapted it slowly till it became this. I used strings to hold the rows instead of arrays just because it made printing and inputing a lot easier. It also iterates on key press instead of using a counter, and stops when you enter 'q'.
I broke out the printing and iterating out into functions so that they can be called independently and you don't have to repeat the code. Hopefully you can use this to figure out what is wrong with your version, plus it gave me a chance to play with substr which i havn't realy done before.