916 Checkerboard V1 Codehs Fixed ^new^

: This is the "magic" math. By adding the row index and column index together and checking if the sum is even or odd, you create a perfect alternating pattern. Without this, every row would look identical.

# Define the square size square_size = canvas_width // 8 916 checkerboard v1 codehs fixed

| Mistake | Why It Happens | Fix | |---------|----------------|------| | Colors are offset (e.g., top-left black) | Used (row + col) % 2 === 1 for red | Use === 0 for red | | Board starts red but columns don't alternate | Forgot to add row and col together | Use (row + col) % 2 | | Squares overlap or wrong spacing | Used same x/y for all squares | Multiply by squareSize | | Board is only 4x4 or wrong size | Wrong number of rows/cols | Set numRows = 8 , numCols = 8 | : This is the "magic" math

Example structure (not exact solution):