///Project #9 // squids.jave /// ///Matthew Testa/// int many=5; Squid school[]= new Squid[many]; String names[]= { "Squid one", "Squid two", "Squid three", "Squid four", "Squid five" }; float spacing; int several=4; Boat fleet[]= new Boat[several]; String names[]= { "Boat one", "Boat two", "Boat three", "Boat four" }; float seperate; float surface; float moonX=0, moonY=100; int score=0; //// SETUP: SIZE AND RESET //// void setup() { size(950, 600); spacing= width/( many+1 ); seperate= width/( several+2 ); reset(); } ///Squids OBJECT// class Squid { float x,y; float dx=0, dy=0; float w=50, h=50; int legs=8; String name=""; float r,g,b; int count=0; ////COLOR AND NAME//// Squid( String s, float x) { this.name= s; this.x=x; ///color/// r= random ( 200,80 ); g= random ( 160, 120 ); b= random (120, 140 ); } //start from bottom and set random speed// void bottom() { y= height - h*.75; dy= -random ( 0.1, 0.9 ); legs= int( random ( 1, 10.9 ) ); } //////MOVE AND SHOW METHOD//// void move() { x += dx; y += dy; if ( y>height ) { bottom(); } else if ( y 80 ) blink=2; ellipse( x, y-h/4, 8, blink ); //eye// //next// fill( r,b,g ); float legX= x-w/2, foot=0; //legs and movement of legs// if ( dy<0 ) { foot=6; if( y%40 > 20 ) foot= -foot; } for ( int i=0; i0 ) text( count, x, y+h/2 ); ///return back to bottom if true// boolean hit( float xx, float yy ) { return dist( xx, yy, x,y ) < h; } } class Boat { float x=0, y=surface, dx=5;