class Room { String name; int x; int y; color color1; color color2; int diveSize; PImage coupleImage; public Room(String name, int x, int y, int certLevel1, int certLevel2, int dives) { this.name = name; this.x = x; this.y = y; this.color1 = certLevelColor[certLevel1]; this.color2 = certLevelColor[certLevel2]; if (dives < 7) this.diveSize = SMALL_ELLIPSE; else if (dives > 10) this.diveSize = LARGE_ELLIPSE; else this.diveSize = MEDIUM_ELLIPSE; this.coupleImage = loadImage(name + ".jpg"); } void draw() { // draw the cert level circle if (color1 == color(255, 255, 255)) stroke(0); else noStroke(); fill(color1); arc(x, y, diveSize, diveSize, radians(90), radians(270)); fill(color2); arc(x, y, diveSize, diveSize, radians(270), radians(360)); arc(x, y, diveSize, diveSize, radians(0), radians(90)); // if mouse hover - draw image if (dist(x, y, mouseX, mouseY) < diveSize / 2) { image(coupleImage, 215, 270); } } }