New to processing as I’ve just started it in uni and there’s a question I don’t really know how to do after doing the 8x8 grid in blue. Here is the question (Imgur: The magic of the Internet) thank you for any help.
It’s about nested for loops
So one for loop inside another
This means, the inner draws a row (its cells) and the outer repeats this for each row (the rows)
Show your attempt please
Ah, you mean after the blue grid, ok
After the blue grid we got a chess board
Distinguish between two types of squares:
Sum of row number plus column number is divisible by 2
if((x+y ) % 2 == 0 ) { // adjust names x and y to your liking
...
}
else {
...
}
Then proceed with the two different types of cells
each has a for loop (not nested)
Remark for the 4 rects
Look at rectMode(CENTER);
might help for the rects
Show your attempt