fish[] tuna = new fish[70]; bubble[] baby; int numbubble=100; Ball[] ourBalls; int numBalls = 100; void setup() { size(700,400); smooth(); for (int i = 0; i < tuna.length; i=i+1) { color somecolor = color(random(50),random(50),random(255)); tuna[i] = new fish(somecolor,random(50)); } ourBalls = new Ball[numBalls]; for (int j = 0;j < ourBalls.length; j=j+1) { //Ball(int windowWidth, int windowHeight, int ballSize, int xPosition, // int yPosition, int xDir, int yDir color anchobicolor = color (random(255), random(255),random(0),100); ourBalls[j] = new Ball(anchobicolor, width, height, 10 ,30,j , 4, 4); } baby= new bubble[numbubble]; for(int k = 0 ; k < baby. length; k=k+1) { baby[k]= new bubble(random(40)); } } void draw() { background(255); for (int i = 0; i < tuna.length; i=i+1) { tuna[i].draw(); tuna[i].swim(); } for (int j = 0; j < ourBalls.length; j=j+1) { ourBalls[j].display(); } for(int k=0 ; k < baby.length; k=k+1) { baby[k].display(); baby[k].up(); } } void mousePressed() { for (int k = 0; k < baby.length; k=k+1) { //(baby[k].isInside(mouseX,mouseY)) { baby[k].changeState(); //} } }