class Square{ int x,y,s; color f; Square(int _x,int _y, int _s){ x = _x; y = _y; s = _s; f = 255; } void drawBox(){ fill(f); rect(x,y,s/2,s/2); } void rollover(){ if (mouseX < s && mouseY < s) { f = 125; } else if (mouseX > s && mouseY < s){ f = 0; } else if (mouseX < s && mouseY > s){ f = 175; } else if (mouseX > s && mouseY > s){ f = 255; } } }