[Tutor] More trouble debugging my game of life program
matt at mattanddawn.orangehome.co.uk
Mon Jun 4 22:05:49 CEST 2007
On Sun, 2007-06-03 at 18:09 -0400, Brian van den Broek wrote:
> The first thing I would do to try to track down the problem would be
> to try 15x30 and 30x15 matrices. If you have two cases where one
> behaves as expected and one does not, it is usually very useful to try
> to match the two cases as closely as possible as an aid to pinpointing
> the problem.
Initially 15*30 worked but 30*15 didn't. I have just gradually
increased the width of my text file up to 30 characters and it worked
at 30*30 so I guess the problem must be with the text file I was using.
Looking at my code - I can see it will break if the lists within the
big list making up the matrix are not all the same length. Maybe this
is something I need to test for in the program.
More information about the Tutor