Mar-03-2017, 01:50 AM
How do you know that line is not the problem? Are you sure that board isn't getting corrupted somehow so that the rows are no longer strings of length 4?
If this were my code and I was getting that error, I would print each row before the line is generated. That way you can see exactly what row is causing the error.
Also, I'm a little confused by the
If this were my code and I was getting that error, I would print each row before the line is generated. That way you can see exactly what row is causing the error.
Also, I'm a little confused by the
if(count > 0):
part. The for loops in the if and the else seem identical. The difference is whether your print the line or return it. I would calculate the line outside the if/else, and then just use the conditional to print or return as needed. Bugs breed in repeated code.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures