The Perfect Pizza!
Note: Look at drag.py file for final product, new.py is just some test code, and firststeps.py is just a quittable window with a pizza
Final Reflection
-
Idea: The idea behind this project was to create a fun memorization game using pygame using food, or PIZZAS! First the user will be prompted a difficulty level from easy, medium, and hard. Then a pizza with random toppings will be generated for a certain amount of seconds with a clock counting the time on the screen. Then you will have a certain amount of seconds to drag the ingredients from the side onto a blank pizza to recreate approximately what you saw. You will have a certain amount of chances which are deducted for each wrong ingredient or missing ingredient for the pizza. As you get more pizzas correct, the amount of time you have available to recreate the pizza decreases. This was the big plan.
-
Current State: In the current state of my project there are three different ingredients which can be dragged around the screen - Mushrooms, pepperoni and chicken, on top of the pizza. There also exists a function which reandomly places each ingredient onto area where the pizza was generated. Although not yet a fully functional "game" yet, my code can randomly generate these toppings which would be the basis for the "memorization" aspect of the game. Next, I also created a state machine function which alternates between the randomized and nonrandomized assortment of pizza toppings in separate "run" functions (run and run2) with the variable state_number = 1 being the nonrandomized assortment and state_number = 2, the random assortment. With this basis I attempted to create a timer aspect to the alternation between the states however that is still a work in progress. As of now, the user would have to manually change the state_number variable to change the state of the toppings.
-
Future Plans: As soon as the timer aspect is integrated into the code, I could begin assigning "points" for placing toppings in the same place as the randomized arrangement after the state has been reverted. If the user would place the topping into the same general restricted by x,y coordinates (leaving room for some error of course), they would get a point. If placed a topping outside this area they would be penalized for it. I would also create a timer for the player to see how many seconds they have to memorize the toppings. I would also create an into screen where users could choose between difficulty marked by how mnay toppings are in play, approximately 3 for easy 5 for medium and 7 for hard, and then choose "Play Game," navigating only within the screen and not the code. And in each of the difficulty levels I would subtract the time they have to memorize the randomized state, probably integrated somehwere into the state machine function. Right now since the user has to manually change the state the game is still not in a "playable" format however with these additions I expect that the user could simply run the code and go straight into game play. It is still a work in progress.