I'd check that this expression in the for() statements

row >= 0, column >= 0

really does what you hope it does. You'd probably want some sort of logical operator there instead of the comma.

Come to think of it, the variables used inside the for loop might need some tweaking as well. The way it's written you're only checking one square for each for loop, but you're doing it a bunch of times.