Your browser does not support the canvas tag.

previous        Show / Hide Source        Download        next
//DONUT MAKER 5000//
//INTERACTIVE TOY//
//By : BENNY CHUNG//

//Create and Eat Donuts, you'll also get judged on your Donut making skills//

/*Go through the Donut making process step-by-step
 Click on the "NEXT" and "AGAIN" buttons to proceed with each Menu
 Click on each donut to eat them (on menu 1)
 Click and Re-Click to place the Donuts (on menu 2)
 Click on the Ingredients to select your frosting
 then Click on the donuts to Frost (on menu 3)
 Finish  by getting your donuts judged
 and Repeat the process over and over again.
 */

int donutA = 6;
int donutB = 3;
int donutC = 2;
int donutD = 8;
int frosting = 0;
int donutType = 0;
int menu = 0;
int quality = 0;


void setup () {
  size (400, 400);
}

void draw() {

  background (255);

  if (menu == 0) {

    resetIngredients ();

    drawRainbow();
    drawMenu0 ();
    drawNext();
    //Click the "Next Button" to go to the next Menu//
    if (mouseX >=320 && mouseY >=360 && mousePressed) {
      menu = 1;
    }
  }

  if (menu == 1) {

    //Background//
    drawMenu1();

    //Donut Munch//
    checkLargeDonuts();
    checkEat ();

    drawNext();
    //Click the "Next Button" to go to the next Menu, Can only be pressed once all the donuts have been eaten//
    if (mouseX >=320 && mouseY >=360 && mousePressed && donutA == 0 && donutB==0 && donutC == 0 && donutD == 0) {
      menu = 2;
    }
  }
  if (menu == 2) {

    drawMenu2();
    //Donut Choosing//
    checkDonutType();
    checkMiniDonuts();

    drawNext();
    //Click the "Next Button" to go to the next Menu, Can only be pressed once all the donuts have a new base donut//
    if (mouseX >=320 && mouseY >=360 && mousePressed && donutA != 0 && donutB!=0 && donutC != 0 && donutD != 0) {
      menu = 3;
    }
  }
  if (menu == 3) {

    drawMenu3 ();
    checkLargeDonuts();

    //Chocolate or Strawberry//

    checkFrosting ();
    checkDonutTopping();

    drawNext();
    //Click the "Next Button" to go to the next Menu, Can only be pressed once a frosting has been selected, donuts do not need to be changed//
    if (mouseX >=320 && mouseY >=360 && mousePressed && frosting != 0) {
      menu = 4;
    }
  }

  if (menu == 4) {

    drawRainbow();
    drawMenu4 ();

    //Click the "Again Button" to go back to the beginning//
    if (mouseX <= 100 && mouseY >=360 && mousePressed) {
      menu = 0;
    }
  }
}



//Donut Establishment//
//User-Defined Functions to Pre-Draw Each kind of "Donut" and allow them to be drawn anywhere//
//Crumbs//
void drawDonut0(int x, int y) {
  rectMode(CENTER);
  fill (195, 226, 255);
  noStroke();
  rect(x, y, 140, 140);
  strokeWeight (5);
  stroke (230, 200, 100);
  line (x-10, y-10, x-20, y-15);
  line (x+50, y-60, x+30, y-50);
  line (x-30, y+45, x-20, y+35);
  line (x+30, y+30, x+25, y+35);
}
//Whole//
void drawDonut1 (int x, int y) {
  ellipseMode(CENTER);
  noStroke();
  fill (230, 200, 100);
  ellipse (x, y, 140, 140);
  fill (255, 255, 255, 75);
  ellipse (x, y, 120, 120);
}
//Hole//
void drawDonut2 (int x, int y) {
  ellipseMode(CENTER);
  noStroke();
  fill (230, 200, 100);
  ellipse (x, y, 140, 140);
  fill (255, 255, 255, 75);
  ellipse (x, y, 120, 120);
  fill (230, 200, 100);
  ellipse (x, y, 40, 40);
  fill (195, 226, 255);
  ellipse (x, y, 30, 30);
}
//Whole Chocolate//
void drawDonut3 (int x, int y) {
  noStroke();
  fill (230, 200, 100);
  ellipse (x, y, 140, 140);
  fill (143, 72, 20);
  ellipse (x, y, 90, 90);
  ellipse (x-43, y, 40, 40);
  ellipse (x, y-37, 50, 50);
  ellipse (x-27, y-27, 40, 40);
  ellipse (x+33, y+23, 40, 40);
  ellipse (x+33, y-33, 35, 35);
  ellipse (x+37, y-7, 40, 40);
  ellipse (x-23, y+37, 40, 40);
  ellipse (x+7, y+33, 50, 50);
  ellipse (x-37, y+23, 30, 30);
}
//Whole Strawberry//
void drawDonut4 (int x, int y) {
  noStroke();
  fill (230, 200, 100);
  ellipse (x, y, 140, 140);
  fill (255, 144, 201);
  ellipse (x, y, 90, 90);
  ellipse (x+43, y, 40, 40);
  ellipse (x, y+37, 50, 50);
  ellipse (x+27, y+27, 40, 40);
  ellipse (x-33, y-23, 40, 40);
  ellipse (x-33, y+33, 35, 35);
  ellipse (x-37, y+7, 40, 40);
  ellipse (x+23, y-37, 40, 40);
  ellipse (x-7, y-33, 50, 50);
  ellipse (x+37, y-23, 30, 30);
}
//Chocolate Hole//
void drawDonut6 (int x, int y) {
  noStroke();
  fill (230, 200, 100);
  ellipse (x, y, 140, 140);
  fill (143, 72, 20);
  ellipse (x, y, 90, 90);
  ellipse (x-43, y, 40, 40);
  ellipse (x, y-37, 50, 50);
  ellipse (x-27, y-27, 40, 40);
  ellipse (x+33, y+23, 40, 40);
  ellipse (x+33, y-33, 35, 35);
  ellipse (x+37, y-7, 40, 40);
  ellipse (x-23, y+37, 40, 40);
  ellipse (x+7, y+33, 50, 50);
  ellipse (x-37, y+23, 30, 30);
  fill (230, 200, 100);
  ellipse (x, y, 40, 40);
  fill (195, 226, 255);
  ellipse (x, y, 30, 30);
}
//Hole Strawberry//
void drawDonut8 (int x, int y) {
  noStroke();
  fill (230, 200, 100);
  ellipse (x, y, 140, 140);
  fill (255, 144, 201);
  ellipse (x, y, 90, 90);
  ellipse (x+43, y, 40, 40);
  ellipse (x, y+37, 50, 50);
  ellipse (x+27, y+27, 40, 40);
  ellipse (x-33, y-23, 40, 40);
  ellipse (x-33, y+33, 35, 35);
  ellipse (x-37, y+7, 40, 40);
  ellipse (x+23, y-37, 40, 40);
  ellipse (x-7, y-33, 50, 50);
  ellipse (x+37, y-23, 30, 30);
  fill (230, 200, 100);
  ellipse (x, y, 40, 40);
  fill (195, 226, 255);
  ellipse (x, y, 30, 30);
}

//Mini Whole//
void drawDonut5 (int x, int y) { 
  ellipseMode(CENTER);
  noStroke();
  fill (230, 200, 100);
  ellipse (x, y, 35, 35);
  fill (255, 255, 255, 75);
  ellipse (x, y, 30, 30);
}
//Mini Hole//
void drawDonut7 (int x, int y) { 
  ellipseMode(CENTER);
  noStroke();
  fill (230, 200, 100);
  ellipse (x, y, 35, 35);
  fill (255, 255, 255, 75);
  ellipse (x, y, 30, 30);
  fill (230, 200, 100);
  ellipse (x, y, 15, 15);
  fill (255);
  ellipse (x, y, 10, 10);
}
//PLACE HERE//
void drawDonut9 (int x, int y) {
  textSize (12);
  fill (0);
  text ("PLACE", x-18, y-3);
  text ("HERE", x-14, y+13);
  stroke (0);
  strokeWeight (2);
  line (x+20, y+20, x+20, y+10);
  line (x+20, y+20, x+10, y+20);
  line (x+20, y-20, x+20, y-10);
  line (x+20, y-20, x+10, y-20);
  line (x-20, y+20, x-20, y+10);
  line (x-20, y+20, x-10, y+20);
  line (x-20, y-20, x-20, y-10);
  line (x-20, y-20, x-10, y-20);
}

//Rainbow Background//
void drawRainbow() {
  for (int bg = 0; bg <= 800; bg = bg + 100) {
    colorMode(HSB);
    noStroke();
    fill ((bg/3), 240, 240);
    quad (bg, 0, bg+100, 0, bg-300, 400, bg-400, 400);
  }
  colorMode(RGB);
}

//NEXT Button//
//The Next Button that is required to be drawn on each menu except for Menu4//
void drawNext() {
  rectMode (CORNER);
  noStroke();
  fill (0);
  rect (315, 355, 85, 45);
  fill (255, 50, 50);
  rect(320, 360, 75, 35);
  textSize (27);
  fill (255);
  text ("NEXT", 322, 387);
}

//Function to reset all variables that affect the changing of donuts//
void resetIngredients () {
  quality = (int) random(0, 10);
  frosting = 0;
  donutType = 0;
}

//Function to check for "eat" reset each Donut to 0//
//Clicking the location of the donut will "eat" that donut//
void checkEat () {
  if (mouseX >=50 && mouseX <= 190 && mouseY >=50 && mouseY <=190 && mousePressed) {
    donutA = 0;
  } else if (mouseX >=210 && mouseX <= 350 && mouseY >=50 && mouseY <=190 && mousePressed) {
    donutB = 0;
  } else if (mouseX >=50 && mouseX <= 190 && mouseY >=210 && mouseY <=350 && mousePressed) {
    donutC = 0;
  } else if (mouseX >=210 && mouseX <= 350 && mouseY >=210 && mouseY <=350 && mousePressed) {
    donutD = 0;
  }
}

//Functions to check and draw the specified donut, in the specfic Donut's space//
//The values of Donut(A,B,C,D) directly draws the specifed (drawDonut#)
void checkLargeDonuts () {
  //A or Top Left//
  if (donutA == 0) {
    drawDonut0(120, 120);
  } else if (donutA == 1) {
    drawDonut1(120, 120);
  } else if (donutA == 2) {
    drawDonut2(120, 120);
  } else if (donutA == 3) {
    drawDonut3(120, 120);
  } else if (donutA == 4) {
    drawDonut4(120, 120);
  } else if (donutA == 6) {
    drawDonut6(120, 120);
  } else if (donutA == 8) {
    drawDonut8(120, 120);
  }
  //B or Top Right//  
  if (donutB == 0) {
    drawDonut0(280, 120);
  } else if (donutB == 1) {
    drawDonut1(280, 120);
  } else if (donutB == 2) {
    drawDonut2(280, 120);
  } else if (donutB == 3) {
    drawDonut3(280, 120);
  } else if (donutB == 4) {
    drawDonut4(280, 120);
  } else if (donutB == 6) {
    drawDonut6(280, 120);
  } else if (donutB == 8) {
    drawDonut8(280, 120);
  }
  //C or Bottom Left//
  if (donutC == 0) {
    drawDonut0(120, 280);
  } else if (donutC == 1) {
    drawDonut1(120, 280);
  } else if (donutC == 2) {
    drawDonut2(120, 280);
  } else if (donutC == 3) {
    drawDonut3(120, 280);
  } else if (donutC == 4) {
    drawDonut4(120, 280);
  } else if (donutC == 6) {
    drawDonut6(120, 280);
  } else if (donutC == 8) {
    drawDonut8(120, 280);
  }
  //D or Bottom Right//
  if (donutD == 0) {
    drawDonut0(280, 280);
  } else if (donutD == 1) {
    drawDonut1(280, 280);
  } else if (donutD == 2) {
    drawDonut2(280, 280);
  } else if (donutD == 3) {
    drawDonut3(280, 280);
  } else if (donutD == 4) {
    drawDonut4(280, 280);
  } else if (donutD == 6) {
    drawDonut6(280, 280);
  } else if (donutD == 8) {
    drawDonut8(280, 280);
  }
}

//Functions to check and draw the specified donut, in the specfic Donut's space//
//Only "Incomplete" Donuts are checked for, then a "Thumbnail" version is drawn rather than a full-sized donut.//
//The donut thumbnails are drawn from left to right//
void checkMiniDonuts() {
  //A or Left//
  if (donutA == 0) {
    drawDonut9 (220, 300);
  } else if (donutA == 1) {
    drawDonut5 (220, 300);
  } else if (donutA == 2) {
    drawDonut7 (220, 300);
  }
  //B or Mid Left//
  if (donutB == 0) {
    drawDonut9 (270, 300);
  } else if (donutB == 1) {
    drawDonut5 (270, 300);
  } else if (donutB == 2) {
    drawDonut7 (270, 300);
  }
  //C or Mid Right//
  if (donutC == 0) {
    drawDonut9 (320, 300);
  } else if (donutC == 1) {
    drawDonut5 (320, 300);
  } else if (donutC == 2) {
    drawDonut7 (320, 300);
  }
  //D or Right//
  if (donutD == 0) {
    drawDonut9 (370, 300);
  } else if (donutD == 1) {
    drawDonut5 (370, 300);
  } else if (donutD == 2) {
    drawDonut7 (370, 300);
  }
}

//Function to determine what kind of variable needs to be set for the Base Donuts//
void checkDonutType() {
  //Clicking the large donuts sets the DonutType Variable//
  if (mouseX >= 225 && mouseX <= 375 && mouseY >= 25 && mouseY <=175 && mousePressed) {
    donutType = 1;
  } else if (mouseY >= 225 && mouseY <= 375 && mouseX >= 25 && mouseX <=175 && mousePressed) {
    donutType = 2;
  }
  //A mini-donut that trails the mouse will be drawn once the donutType variable has been changed//
  if (donutType == 1) {
    drawDonut5 (pmouseX, pmouseY);
  } else if (donutType == 2) {
    drawDonut7 (pmouseX, pmouseY);
  }
  //Clicking each donut's space will redraw the donut and change the variable in relation to the current donutType//
  if (donutType == 1 && mouseX >= 200 && mouseX <= 240 && mouseY >= 280 && mouseY <= 320 && mousePressed) {
    donutA = 1;
  } else if (donutType == 2 && mouseX >= 200 && mouseX <= 240 && mouseY >= 280 && mouseY <= 320 && mousePressed) {
    donutA = 2;
  } else if (donutType == 1 && mouseX >= 250 && mouseX <= 290 && mouseY >= 280 && mouseY <= 320 && mousePressed) {
    donutB = 1;
  } else if (donutType == 2 && mouseX >= 250 && mouseX <= 290 && mouseY >= 280 && mouseY <= 320 && mousePressed) {
    donutB = 2;
  } else if (donutType == 1 && mouseX >= 300 && mouseX <= 340 && mouseY >= 280 && mouseY <= 320 && mousePressed) {
    donutC = 1;
  } else if (donutType == 2 && mouseX >= 300 && mouseX <= 340 && mouseY >= 280 && mouseY <= 320 && mousePressed) {
    donutC = 2;
  } else if (donutType == 1 && mouseX >= 350 && mouseX <= 390 && mouseY >= 280 && mouseY <= 320 && mousePressed) {
    donutD = 1;
  } else if (donutType == 2 && mouseX >= 350 && mouseX <= 390 && mouseY >= 280 && mouseY <= 320 && mousePressed) {
    donutD = 2;
  }
}

//Function to determine what kind of variables needs to be set for the frosting of the Donuts//
void checkFrosting() {
  //Clicking on either the Choclate Bar, Strawberry or Tissue Box changes the type of frosting//
  if (mouseY <=60 && mouseX <=60 && mousePressed) {
    frosting = 1;
  } else if (mouseY <=60 && mouseX >= 340 && mousePressed) {
    frosting = 2;
  } else if (mouseY >=175 && mouseY <=225 && mouseX >=175 && mouseX <=225 && mousePressed) {
    frosting = 3;
  }

  //Depending on the type of frosting, a frosting tube/tissue paper will be drawn trailing the mouse//
  if (frosting == 1) {
    fill (143, 72, 20);
    noStroke();
    quad (pmouseX-30, pmouseY-10, pmouseX-15, pmouseY-5, pmouseX-5, pmouseY-15, pmouseX-10, pmouseY-30);
    quad (pmouseX+10, pmouseY-10, pmouseX-10, pmouseY+10, pmouseX+25, pmouseY+30, pmouseX+30, pmouseY+25);
    fill (250, 250, 250, 200);
    quad (pmouseX-3, pmouseY-13, pmouseX+10, pmouseY-10, pmouseX-10, pmouseY+10, pmouseX-13, pmouseY-3);
    fill (150);
    quad (pmouseX-15, pmouseY-5, pmouseX-5, pmouseY-15, pmouseX-3, pmouseY-13, pmouseX-13, pmouseY-3);
    quad (pmouseX+25, pmouseY+30, pmouseX+30, pmouseY+25, pmouseX+32, pmouseY+25, pmouseX+25, pmouseY+32);
  } else if (frosting == 2) {
    fill (255, 144, 201);
    noStroke();
    quad (pmouseX+30, pmouseY-10, pmouseX+15, pmouseY-5, pmouseX+5, pmouseY-15, pmouseX+10, pmouseY-30);
    quad (pmouseX-10, pmouseY-10, pmouseX+10, pmouseY+10, pmouseX-25, pmouseY+30, pmouseX-30, pmouseY+25);
    fill (250, 250, 250, 200);
    quad (pmouseX+3, pmouseY-13, pmouseX-10, pmouseY-10, pmouseX+10, pmouseY+10, pmouseX+13, pmouseY-3);
    fill (150);
    quad (pmouseX+15, pmouseY-5, pmouseX+5, pmouseY-15, pmouseX+3, pmouseY-13, pmouseX+13, pmouseY-3);
    quad (pmouseX-25, pmouseY+30, pmouseX-30, pmouseY+25, pmouseX-32, pmouseY+25, pmouseX-25, pmouseY+32);
  } else if (frosting == 3) {
    fill (255, 255, 255, 200);
    quad (pmouseX-20, pmouseY, pmouseX, pmouseY-20, pmouseX+20, pmouseY, pmouseX, pmouseY+20);
  }
}

//Function to change each Donut's variable when a frosting is chosen, and when the appropiate donut is clicked//
void checkDonutTopping () {
  //Chocolate Frosting//
  if (frosting == 1) {
    if ((donutA == 1 || donutA == 4) && mouseX >=50 && mouseX <= 190 && mouseY >=50 && mouseY <=190 && mousePressed) {
      donutA = 3;
    } else if ((donutA == 2 || donutA == 8) && mouseX >=50 && mouseX <= 190 && mouseY >=50 && mouseY <=190 && mousePressed) {
      donutA = 6;
    } else if ((donutB == 1 || donutB == 4) && mouseX >=210 && mouseX <= 350 && mouseY >=50 && mouseY <=190 && mousePressed) {
      donutB = 3;
    } else if ((donutB == 2 || donutB == 8) && mouseX >=210 && mouseX <= 350 && mouseY >=50 && mouseY <=190 && mousePressed) {
      donutB = 6;
    } else if ((donutC == 1 || donutC == 4) && mouseX >=50 && mouseX <= 190 && mouseY >=210 && mouseY <=350 && mousePressed) {
      donutC = 3;
    } else if ((donutC == 2 || donutC == 8) && mouseX >=50 && mouseX <= 190 && mouseY >=210 && mouseY <=350 && mousePressed) {
      donutC = 6;
    } else if ((donutD == 1 || donutD == 4) && mouseX >=210 && mouseX <= 350 && mouseY >=210 && mouseY <=350 && mousePressed) {
      donutD = 3;
    } else if ((donutD == 2 || donutD == 8)&& mouseX >=210 && mouseX <= 350 && mouseY >=210 && mouseY <=350 && mousePressed) {
      donutD = 6;
    }
  }
  //Strawberry Frosting//
  if (frosting == 2) {
    if ((donutA == 1 || donutA == 3) && mouseX >=50 && mouseX <= 190 && mouseY >=50 && mouseY <=190 && mousePressed) {
      donutA = 4;
    } else if ((donutA == 2 || donutA == 6) && mouseX >=50 && mouseX <= 190 && mouseY >=50 && mouseY <=190 && mousePressed) {
      donutA = 8;
    } else if ((donutB == 1 || donutB == 3) && mouseX >=210 && mouseX <= 350 && mouseY >=50 && mouseY <=190 && mousePressed) {
      donutB = 4;
    } else if ((donutB == 2 || donutB == 6) && mouseX >=210 && mouseX <= 350 && mouseY >=50 && mouseY <=190 && mousePressed) {
      donutB = 8;
    } else if ((donutC == 1 || donutC == 3) && mouseX >=50 && mouseX <= 190 && mouseY >=210 && mouseY <=350 && mousePressed) {
      donutC = 4;
    } else if ((donutC == 2 || donutC == 6) && mouseX >=50 && mouseX <= 190 && mouseY >=210 && mouseY <=350 && mousePressed) {
      donutC = 8;
    } else if ((donutD == 1 || donutD == 3) && mouseX >=210 && mouseX <= 350 && mouseY >=210 && mouseY <=350 && mousePressed) {
      donutD = 4;
    } else if ((donutD == 2 || donutD == 6) && mouseX >=210 && mouseX <= 350 && mouseY >=210 && mouseY <=350 && mousePressed) {
      donutD = 8;
    }
  }

  //Tissue "Frosting"//
  if (frosting == 3) {
    if ((donutA == 3 || donutA == 4) && mouseX >=50 && mouseX <= 190 && mouseY >=50 && mouseY <=190 && mousePressed) {
      donutA = 1;
    } else if ((donutA == 6 || donutA == 8) && mouseX >=50 && mouseX <= 190 && mouseY >=50 && mouseY <=190 && mousePressed) {
      donutA = 2;
    } else if ((donutB == 3 || donutB == 4) && mouseX >=210 && mouseX <= 350 && mouseY >=50 && mouseY <=190 && mousePressed) {
      donutB = 1;
    } else if ((donutB == 6 || donutB == 8) && mouseX >=210 && mouseX <= 350 && mouseY >=50 && mouseY <=190 && mousePressed) {
      donutB = 2;
    } else if ((donutC == 3 || donutC == 4) && mouseX >=50 && mouseX <= 190 && mouseY >=210 && mouseY <=350 && mousePressed) {
      donutC = 1;
    } else if ((donutC == 6 || donutC == 8) && mouseX >=50 && mouseX <= 190 && mouseY >=210 && mouseY <=350 && mousePressed) {
      donutC = 2;
    } else if ((donutD == 3 || donutD == 4) && mouseX >=210 && mouseX <= 350 && mouseY >=210 && mouseY <=350 && mousePressed) {
      donutD = 1;
    } else if ((donutD == 6 || donutD == 8) && mouseX >=210 && mouseX <= 350 && mouseY >=210 && mouseY <=350 && mousePressed) {
      donutD = 2;
    }
  }
}

//Static Menu//
void drawMenu0 () {
  //"DONUT MAKER 5000"//
  fill (0);
  textSize (80);
  text ("DONUT", 60, 120);
  text ("MAKER", 65, 220);
  text ("5000", 100, 320);
}

//Static Menu//
void drawMenu1 () {
  //Donut Box//
  rectMode (CORNER);
  noStroke();
  fill (195, 226, 255);
  rect (40, 40, 320, 320);
  fill (84, 130, 173);
  quad (40, 40, 40, 360, 30, 365, 30, 30);
  quad (360, 40, 360, 360, 370, 365, 370, 30);
  quad (40, 360, 30, 365, 370, 365, 360, 360);
  fill (210, 240, 255);
  quad (40, 40, 30, 30, 370, 30, 360, 40);
}

//Static Menu//
void drawMenu2 () {
  //PICK 4 DONUTS//
  fill (0);
  textSize (40);
  text ("PICK", 60, 50);
  text ("4", 85, 100);
  text ("DONUTS", 20, 150);
  //These donuts have been drawn, and not using the pre-defined donuts, since they need to be slightly larger//
  //Whole Donut//
  ellipseMode(CENTER);
  noStroke();
  fill (230, 200, 100);
  ellipse (300, 100, 150, 150);
  fill (255, 255, 255, 75);
  ellipse (300, 100, 130, 130);

  //Hole Donut//
  ellipseMode(CENTER);
  noStroke();
  fill (230, 200, 100);
  ellipse (100, 300, 150, 150);
  fill (255, 255, 255, 75);
  ellipse (100, 300, 130, 130);
  fill (230, 200, 100);
  ellipse (100, 300, 50, 50);
  fill (255);
  ellipse (100, 300, 40, 40);
}

//Static Menu//
void drawMenu3 () {
  //Donut Plate//
  fill (195, 226, 255);
  ellipse (width/2, height/2, 420, 420);
  fill (35, 94, 250);
  ellipse (width/2, height/2, 390, 390);
  fill (195, 225, 255);
  ellipse (width/2, height/2, 380, 380);


  //Chocolate Bar//
  fill (211, 44, 2);
  quad (20, 20, 60, 20, 50, 70, 10, 60);
  fill (196);
  triangle (20, 20, 60, 20, 30, 40);
  fill (143, 72, 20);
  quad (20, 20, 60, 20, 62, 10, 25, 0);

  //Strawberry//
  //Stem//
  fill (29, 203, 82);
  quad (365, 10, 360, 20, 365, 30, 370, 20);
  fill (7, 137, 47);
  quad (365, 20, 375, 10, 375, 25, 365, 35);
  fill (29, 203, 82);
  quad (385, 15, 375, 20, 370, 30, 380, 30);
  fill (7, 137, 47);
  quad (390, 25, 375, 25, 375, 30, 380, 35);
  fill (29, 203, 82);
  quad (395, 35, 380, 30, 375, 35, 380, 40);
  //Berry//
  fill (245, 73, 47);
  ellipse (360, 40, 40, 40);
  //Seeds//
  fill (255);
  for (float x = 348; x <= 377; x = x + 10) {
    for (float y = 32; y <=59; y = y + 10) {
      quad (x, y, x + 3, y - 1, x + 5, y - 5, x + 2, y - 4);
    }
  }
  //TissueBox//
  fill (255);
  quad (200, 200, 200, 220, 180, 220, 180, 200);
  fill (200);
  quad (200, 200, 200, 220, 210, 210, 210, 190);
  fill (220);
  quad (180, 200, 200, 200, 210, 190, 190, 190);
  fill (255);
  quad (190, 200, 200, 190, 200, 180, 190, 190);
}

//Static Menu//
void drawMenu4() {
  //Donut Score//
  fill (0);
  textSize (80);
  text ("DONUT", 65, 120);
  text ("QUALITY", 32, 220);
  text ("/10", 175, 320);
  //The quality score, is random declared. It is "re-rerolled" each time you return to Menu0//
  text (quality, 125, 320);

  //Again Button//
  rectMode (CORNER);
  noStroke();
  fill (0);
  rect (0, 355, 95, 45);
  fill (255, 50, 50);
  rect(5, 360, 85, 35);
  textSize (26);
  fill (255);
  text ("Again?", 5, 387);
}