
checker board
Hi,
I'm to create a board alternating between black and white squares. The board's dimension is even random number of 1020 squares by 1020 squares. For instance, a board with the width of 14 squares and length of 16 squares. So far I'm having no problem... Now to the difficult part.
Imagine a line connecting the midpoint of the top side of board to the midpoint of the left side of the board. Every square (black or white) that this imaginary line intersects will turn into a red square.
Imagine 3 more lines: midpoint top to midpoint right, midpoint bottom to midpoint left, midpoint bottom to midpoint right. All with the same condition: every square (black or white) that this imaginary line intersects will turn into a red square.
If the board happens to be a square, I see the algorithm for drawing it. However, I stumped if the board is not a square. Any help is appreciated!