Crazy Cooking (Instructions below and in game) Click order paper to view the required amount of each ingredient, click the folded corner to close it If the order fails to appear, close and re-open it Place the correct amount of ingredients in the pot and click the ladle to finish The soup will splash if the vegetable was used Use R key to reset ingredients in pot (in case of accident) Once a vegetable is used it will reappear in the drawer Score is shown in top left corner You can earn up to 8 points per order, 24 total at the end Use R key to reset ingredients Left and right arrow keys to mess with stove dial, not necessary
Documentation for Crazy Cooking Program Introduction This is a cooking game where the goal is to complete making 3 soups in a four minute time span. You have 8 ingredients too work with, 4 vegetables and 4 spices. Each order will have a random amount of each you need to place in. You can move ingredients by dragging and complete the order by clicking the ladle. Algorithms When making this program, gravity was added by forever lowering the y velocity variable (attached to y position) unless touching the table where the y velocity stopped changing. I made the ingredients always go to a specific position unless above a certain point using if/else statements. Also, if the ingredient was on or above the pot, it was added. For the order sheet, I made a number generator that created a random sequence of numbers, one for each ingredient, then kept that sequence until the pot was complete using a true/false variable to detect weather or not the numbers had already been generated. For scoring, I made a variable that cycled through each ingredient by changing by 1 after each run through. To confirm the ingredient was correct, I made a variable of the required amount of an ingredient, then checked if the amount in the pot was matching. Th clock in the top right corner was made by using variables for each digit. When the first digit reached 0, the second digit waited one second before changing, then repeated the process. This was the same for the third digit, waiting for both the first and second digit to be zero before changing a second later. Reflection I mainly used if/else (mainly nesting) statements in this program. This worked for checking the ingredients, the timer, the gravity, and the order paper. These were the main aspects of the game, so using a changing variable combined with if/else statements allowed for a quick and easy system for several different pieces of the game. This cooking game idea was chosen because it already had several natural aspects that the rubric required such as forever loops, repeating blocks, variables, and cloning because of the different vegetables and spices. It also made use of many different colors and designs to make good art for the game. Websites used: https://soundimage.org/looping-music/ for music