9.1.7 Checkerboard V2 Codehs -

if ((row + col) % 2 == 0) square.setFillColor(Color.RED); else square.setFillColor(Color.BLACK);

To build a checkerboard, you need to understand the relationship between the row index ( ) and the column index ( 9.1.7 Checkerboard V2 Codehs