class egg{ int x,y; egg(int px, int py){ x = px; y = py; warpfx(); } void draw(){ ellipseMode(CENTER); noStroke(); fill(c); ellipse(LEFTOFWORLD+(x*BOXSIZE)+BOXSIZE/2,TOPOFWORLD+(y*BOXSIZE)+BOXSIZE/2,sz,sz); } float sz = 0; color c = color(128+random(128),128+random(128),128+random(128)) ; int counter = 3; void animate(){ counter--; if(counter <= 0){ c = color(128+random(128),128+random(128),128+random(128)) ; counter = 3; } sz++; } void shiftCW(){ int oldxsquare = x; int oldysquare = y; x = (BOXCOUNT-1)-oldysquare; y = oldxsquare; } void shiftCCW(){ int oldxsquare = x; int oldysquare = y; x = oldysquare; y = (BOXCOUNT-1)-oldxsquare; } }