V2 Codehs | 9.1.7 Checkerboard

If (row + column) % 2 == 0 → Color A. If (row + column) % 2 == 1 → Color B.

At first glance, it seems simple: draw a checkerboard. However, this problem is a classic exercise in , conditional logic , coordinate math , and efficient rendering . It strips away the fluff of game logic and focuses on the core visual structure of an 8x8 grid. 9.1.7 Checkerboard V2 Codehs

for (int row = 0; row < ROWS; row++) for (int col = 0; col < COLS; col++) int x = col * SIZE; int y = row * SIZE; If (row + column) % 2 == 0 → Color A