Re: [Tutor] Re: The Game of Life

2005-01-06 Thread Kent Johnson
Brian van den Broek wrote: In an earlier version, instead of the run_world() method I now have, I put the following within my class definition and after (i.e. outside of) the method defs: .>while self.current_generation > self.total_generations: .>time.sleep(self.sleep_interval) .>

[Tutor] Re: The Game of Life

2005-01-06 Thread Brian van den Broek
Hi all, after making the sketch I posted a bit ago, I tried to turn to actual work. But, the bug had bit. ;-) So, here is an attempt at filling out that sketch in an OOP way. (It is my second OOP program, so if anyone was so inclined, I'd very much appreciate any comments. Also, I have a question

Re: [Tutor] Re: The Game of Life

2005-01-06 Thread Max Noel
On Jan 6, 2005, at 21:20, Brian van den Broek wrote: Oh, the Life rules allow a world where every cell will change in the next generation, iff your world is a torus (i.e. the lower row "touches" the upper row as if it were immediately above it, and the right column "touches" the left column

Re: [Tutor] Re: The Game of Life

2005-01-06 Thread Brian van den Broek
Max Noel said unto the world upon 2005-01-06 15:39: On Jan 6, 2005, at 20:05, Brian van den Broek wrote: I gave some thought (though produced no code) to the question of how to do a life game before you [Danny] posted your code. My naive approach differs a bit, and it seems to me better. I'd li

Re: [Tutor] Re: The Game of Life

2005-01-06 Thread Max Noel
First of all, thanks for answering our questions, Danny! And sorry for the lag before my reply, but I was rather busy over the last few days (moving "back" to the UK). On Jan 6, 2005, at 20:05, Brian van den Broek wrote: I am having a hard time figuring out how to efficiently snip and comment,

[Tutor] Re: The Game of Life

2005-01-06 Thread Brian van den Broek
Danny Yoo said unto the world upon 2005-01-03 04:11: On Mon, 3 Jan 2005, Brian van den Broek wrote: (Aside: one nonobvious example where copying can be avoided is in Conway's Game of Life: when we calculate what cells live and die in the next generation, we can actually use the 'Command' design p