MicroWorlds index |
Recipe Machine Overview | Go to the recipe machine project! |
so you can use the project |
screenshot of recipe machine (inactive buttons) |
To use this project, you need the free MicroWorlds Web Player, but you do not need to know anything about MicroWorlds. This project uses eight hidden textboxes (see below) to store lists of words to be added to the recipes. The machine will randomly create a recipe of 3 - 6 instructions. For each instruction in the recipe, the machine chooses and displays one word at random from each of the first seven textboxes (plus a second word from "howmuch?," "adjectives," and "nouns," and inserts a few linking words to form complete sentences. At the end of each recipe it adds one random line from the "remarks" textbox. Click on "invent a recipe" to see a new recipe. You can add your own ingredients and remarks to the machine by clicking on "add_ingredients" to go to the hidden page. The words you add will only stay in the machine during one visit to the project, but you can go back and forth between the two pages, adding more ingredients or other words, as much as you want during one visit. (If you own MicroWorlds and set up this project, all of your extra ideas will stay as long as you like!)
screenshot of the page for adding ingredients and remarks
If you own MicroWorlds and would like to make your own recipe machine from scratch, here are the procedures. Create textboxes and buttons as shown. (Name your pages "make_recipes" and "add_ingredients." The textbox on the recipe machine is called "text1" -- its name is hidden.)
* * * * *
Procedures for Recipe Machine:
to recipe!
to startup
to invent
to a
[The startup procedure runs automatically when the project loads. It simply makes sure that the recipe machine is empty and that the last line of each textbox is showing on the "add_ingredients" page, to make it easier to add extra items to each box.
The two procedures, "invent" and "a," do not do anything! They are included just so that we can place a button called "Invent a Recipe!" next to the machine. The "recipe!" procedure is the one which actually creates the recipe.
"Recipename" refers to an invisible textbox which appears after a recipe is created, to give it a title (using the fifth and sixth words of the recipe plus the word "surprise."]
|