// Define the Circle class class Circle{ // Variables for Circle class color c; float xpos; float ypos; float xgrowth; float ygrowth; // Constructor for the Circle class Circle(color tempC, float tempXpos, float tempYpos, float tempXgrowth, float tempYgrowth) { c = tempC; xpos = tempXpos; ypos = tempYpos; xgrowth = tempXgrowth; ygrowth = tempYgrowth; } void display() { // Ellipse function to actually draw the things fill(c); ellipse(xpos,ypos,xgrowth,ygrowth); } void grow() { // Function to make the Circle grow and pop back to small size when it gets over 300 high as well as assign new random x and y values for "respawn" // Also subract a life if the Circle grows beyond 200 pixels xgrowth xgrowth = xgrowth +0.25; ygrowth = ygrowth +0.25; if (xgrowth > 200) { lives = lives -1; xpos = random(100,700); ypos = random(10,90); xgrowth = 0.25; ygrowth = 0.25; } } }