Your initBoard function seems a little unorthodox.
Line 19: You do realize this is always going to be true? This means that every time through the inner loop, you're going to initialize the whole board.
Line 15,17: What is the point of the two for loops? You never use r or c (except in line 19).
Last edited on