Create random circles in a grid

Start by drawing a red circle on EVERY square.

Then add a variable that counts (and keeps track of!) how many circles you HAVE drawn.

Then add a conditional statement that draws a circle only if you haven’t drawn enough circles.

Part of you final code will look something like this:

// Maybe draw a circle?
if( num_circles < ??? ){
  fill( ???, ???, ??? );
  ellipse( ???, ???, ???, ??? );
  num_circles += ???;
}
1 Like