| Chapter 15: Tables |

| 15.14. Another scoring example

> To record (T - text) as achieved:
> choose row with a citation of T in the Table of Tasks Achieved;
> if there is no time entry begin;
> change time entry to the time of day;
> award (points entry) points;
> end if.

The phrase above expects to see a table like this one:

> Table of Tasks Achieved

> Points | Citation | Time
> 1 | "pride" | a time
> 3 | "anger"
> 2 | "avarice"
> 4 | "envy"
> 1 | "lust"
> 2 | "gluttony"
> 3 | "sloth"

The middle column records the tasks to be achieved, the first column records the points on offer for each: the final column, initially blank, will store the times at which the tasks are first achieved.

> Before eating, record "gluttony" as achieved.

The first time we record "gluttony" as achieved, 2 points will be awarded and the time will be logged in the Table, but on all subsequent occasions nothing will happen. So the combination of the phrase and the Table will look after a scoring system based on achieving specific goals (probably not the seven deadly sins, of course). We can, if we choose, use the same system to display a log of recent accomplishments:

> repeat through the Table of Tasks Achieved in reverse time order begin;
> say "[time entry]: [citation entry] ([points entry]).";
> end repeat.

216
| Example Goat-Cheese and Sage Chicken Implementing a FULL SCORE command which lists more information than the regular SCORE command, adding times and rankings, as an extension of the example given in this chapter.

> Some games provide a FULL SCORE command that gives more information about the player's achievements than SCORE alone. Supposing we wanted to include a FULL SCORE in our game that gave the kind of score reading described in this chapter: "Goat-Cheese and Sage Chicken" The story headline is "An interactive recipe" Table of Tasks Achieved
> Points | Citation | Time
> 3 | "sauteeing onions" | a time
> 3 | "reconstituting apricots"
> 1 | "flattening chicken"
> 1 | "unwrapping goat cheese"
> To record (T - text) as achieved: choose row with a citation of T in the Table of Tasks Achieved; if there is no time entry begin; change time entry to the time of day; award (points entry) points; end if. Requesting the full score is an action out of world. Understand "full" or "full score" as requesting the full score. Carry out requesting the full score: if the score is 0, say "You have achieved nothing towards supper." instead; repeat through the Table of Tasks Achieved in reverse time order begin; say "[time entry]: [citation entry] ([points entry])."; end repeat. Table of Rankings
> Score | Rank
> 0 | "Rank Amateur"
> 2 | "would-be Bobby Flay"
> 5 | "Alton Brown"
> 8 | "Julia Child"
The Kitchen is a room. The description of the Kitchen is "Equipped with many familiar friends: refrigerator, stove, oven; countertop; cabinet for pans and bowls, and a drawer for your tools." The stove is scenery in the kitchen. It is a supporter. The oven is a container. It is part of the stove. It is closed and openable. The stove's switch is a device. It is switched on. It is part of the stove. The oven's dial is a device. It is switched off. It is part of the oven. A thing can be heatproof. Instead of putting something which is not heatproof on the stove when the stove's switch is switched on: say "You catch yourself just at the last minute: not a good idea to put [the noun] directly on the stove while it's turned on." Instead of switching on the stove, try switching on the stove's switch. Instead of switching off the stove, try switching off the stove's switch. Instead of switching on the oven, try switching on the oven's dial. Instead of switching off the oven, try switching off the oven's dial. Before switching on the oven's dial when the oven is open: say "(closing the oven so that it will heat properly)[paragraph break]"; try closing the oven. The frying pan is a heatproof unopenable open container on the stove. The cabinet is a closed openable container in the kitchen. It is scenery. It contains an open unopenable container called a mixing bowl. It contains a portable supporter called a platter. An open unopenable heatproof container called a Calphalon baking dish is in the cabinet. The baking dish has the description "One of those marvelous pieces of kitchen equipment which goes on the stove or in the oven, as you will. The chief thing is never ever to touch it when it is hot, since the handles are metal and the heat retention excellent." The counter is a supporter in the kitchen. It is scenery. The kettle is a heatproof openable closed container on the counter. Some water is in the kettle. The water can be cool, warm, or boiling. The printed name of the water is "[water condition] water". The refrigerator is a closed openable container in the kitchen. It is scenery. Understand "fridge" as the refrigerator. An ingredient is a kind of thing. Some onions, some apricots, and some sage are ingredients on the counter. A chicken breast, an egg, and goat cheese are ingredients in the refrigerator. The goat cheese can be wrapped, snipped open, or unwrapped. The printed name of the goat cheese is "[goat cheese condition] goat cheese". The sage can be unwashed, clean, or julienned. The sage is unwashed. The printed name of the sage is "[sage condition] sage". The apricots can be dried, reconstituted, or chopped. The apricots are dried. The printed name of the apricots is "[apricots condition] apricots". The chicken breast can be whole, flattened, stuffed, rolled, coated, browned, or baked. The printed name of the chicken breast is "[chicken breast condition] chicken breast". The onions can be unpeeled, peeled, diced, sauteed, or burnt. [The printed name of the onions is "[onions condition] onions".] The can of chicken broth is a closed container on the counter. The bottle of white cooking wine and the bottle of Thurston Wolfe PGV are a closed containers in the refrigerator. The description of the Thurston Wolfe is "A Washington State Pinot Gris-Viognier, 2003. It is said to have 'peach aromas', and, startlingly, the untutored person can detect these without resorting to fantasy. (It is also supposed to possess a delicate perfume and a moderate body; the label author at least stopped short of 'good sense of humor and likes long walks on the beach')." Understand the commands "wash" and "rinse" as "clean". Instead of rubbing the unwashed sage: now the sage is clean; say "You rinse off the sage. There -- ready to slice." Instead of cutting the sage: say "You'd need to have a knife in hand, first." Instead of cutting the clean sage when the player is carrying the butcher knife: now the sage is julienned; say "You slice the sage into thin strips." Instead of cutting the unwashed sage: say "It came from the garden, so it won't have any strange chemicals on it, but you should still give it a rinse for dirt and bugs and so on before using it." Instead of doing something other than examining or rubbing with the unwashed sage: say "It needs to be washed off." Understand "peel [something]" as peeling. Peeling is an action applying to one thing. Instead of peeling the unpeeled onions: now the onions are peeled; say "You tear away the shining outer skin of the onions, leaving them pale and nekkid. Poor things." Instead of cutting the diced onions: say "That seems unnecessary now." Instead of cutting the sauteed onions: say "Too late; you're well past that stage." Instead of cutting the burnt onions: say "There's no rescuing 'em -- the carbon isn't going to flake off, you know." Instead of cutting the unpeeled onions: say "It would help to peel them first." Instead of cutting the peeled onions: say "You'd need to have a knife in hand, first." Instead of cutting the peeled onions when the player is carrying the butcher knife: now the onions are diced; say "You dice the onions neatly. Your own skill brings tears to your eyes." Instead of opening the goat cheese: try peeling the goat cheese instead. Instead of peeling the unwrapped goat cheese: say "The goat cheese is already unwrapped. (Stay focused, stay focused...)" Before peeling the wrapped goat cheese when the shears are held by the player: try cutting the wrapped goat cheese. Instead of peeling the snipped open goat cheese: now the goat cheese is unwrapped; record "unwrapping goat cheese" as achieved; say "Ah, success. The goat cheese is now free of its packet." Instead of peeling the wrapped goat cheese: say "It would help to have a pair of scissors or something -- the packet resists being torn." Instead of cutting the goat cheese: say "No need, at this point." Before cutting the wrapped goat cheese when the shears are not held by the player and the shears are visible: say "(first picking up the shears)[paragraph break]"; try taking the shears. Instead of cutting the wrapped goat cheese: say "Something to cut with would be useful." Instead of cutting the wrapped goat cheese when the shears are held by the player: now the goat cheese is snipped open; say "You neatly snip through the packaging with the shears." Instead of examining the whole chicken breast: say "It is still entire and has yet to be pounded flat." Instead of examining the flattened chicken breast: say "It has been hammered to a thickness of about a half inch. (The recipe said a quarter inch but you're pretty sure it was joking. You have never been able to achieve a quarter inch.)" Instead of attacking the whole chicken breast: say "You need something heavy enough to flatten it with." Instead of attacking the whole chicken breast when the player is holding the wooden mallet: now the chicken breast is flattened; record "flattening chicken" as achieved; say "You hammer away at the chicken breast, turning all your aggressions into culinary goodness. Several minutes pass. When you are done you have a broad flat chickeny pancake suitable for wrapping about a stuffing." Before printing the name of onions: say "[onions condition] ". The drawer is an openable closed container. It is part of the counter. A tool is a kind of thing. A spatula, a spoon, a wooden mallet, some shears, and a ball of twine are tools in the drawer. A butcher knife is a tool carried by the player. Understand "scissors" as the shears. Instead of burning something: say "You'll have to do that the hard way." Some steam is fixed in place. "Dense clouds of steam fill the room." Some smoke is fixed in place. "Smoke is beginning to collect near the ceiling." Sauteeing Onions is a scene. Sauteeing Onions begins when the diced onions are in a hot container. Definition: a heatproof container is hot if it is on the stove and the stove's switch is switched on. Instead of touching the hot pan: say "Ow!" Scorching Onions is a scene. Preheating the Oven is a scene. Preheating the Oven begins when the oven's dial is heating. Definition: a oven's dial is heating if the oven's dial has been switched on for exactly one turn. Preheating the Oven ends when the time since Preheating the Oven began is five minutes. When Preheating the Oven begins: say "The oven begins to warm up." When Preheating the Oven ends: say "The oven beeps to inform you that it has reached the desired hotness." Every turn during Sauteeing Onions: say "The onions sizzle in the pan." Every turn during Scorching Onions: say "The onions are past their prime and are getting blacker by the moment." Every turn during Hearing the Kettle Whistle: say "The kettle continues to whistle." Instead of listening to during Hearing the Kettle Whistle: say "The only thing you can really hear just at the moment is the kettle." Instead of smelling the Kitchen during Sauteeing Onions: try smelling the onions. Instead of smelling the onions during Sauteeing Onions: say "The onions smell marvelous." Instead of opening the oven during Preheating the Oven: say "It'll never heat if you open it up while it's warming." Heating Kettle is a scene. Heating Kettle begins when the hot kettle contains cool water. Before printing the name of the kettle when the kettle is hot: say "hot " When Heating Kettle begins: say "The kettle begins to heat up." Heating Kettle ends when the time since Heating Kettle began is 7 minutes. Hearing the Kettle Whistle is a scene. Hearing the Kettle Whistle begins when Heating Kettle ends. Hearing the Kettle Whistle ends when the kettle is not hot. When Hearing the Kettle Whistle begins: now the water is boiling; say "The kettle begins to burble and whistle shrilly." When Hearing the Kettle Whistle ends: say "The kettle's screaming dies off." Idling is a scene. Idling begins when play begins. Idling ends when Sauteeing Onions begins. Sauteeing Onions ends in disaster when Scorching Onions begins. Sauteeing Onions ends in success when the onions are sauteed and onions are not in a hot container. Definition: a thing is alone if it is in a container which contains exactly one thing. Sauteeing Onions ends in mixture when the sauteed onions are not alone. When Sauteeing Onions ends in mixture: say "The mixture of things in [the holder of the onions] stops them cooking quite so fast." When Sauteeing Onions ends in success: say "Nice work with the onions." Every turn: if diced onions have been in a hot pan for ten turns begin; say "The onions are starting to look ready."; now the onions are sauteed; end if. Scorching Onions begins when Sauteeing Onions ends in disaster. Scorching Onions begins when the alone sauteed onions are in a hot container. Scorching Onions ends horribly when the time since Scorching Onions began is three minutes. Scorching Onions ends in reprieve when the sauteed onions are not in a hot container. Scorching Onions ends in mixture when the sauteed onions are not alone. When Scorching Onions ends in mixture: record "sauteeing onions" as achieved; say "The mixture of things in [the holder of the onions] stops them cooking quite so fast." When Scorching Onions ends horribly: move smoke to Kitchen; now the onions are burnt. When Scorching Onions ends in reprieve: record "sauteeing onions" as achieved; say "You've got the onions off heat before they can scorch -- a good sign." Instead of taking the onions when the onions are in the pan: try taking the pan. Instead of smelling in the presence of the smoke: say "The scent of the late disaster lingers in the air." Reconstituting the Apricots is a scene. Reconstituting the Apricots begins when the dried apricots are in a container which contains boiling water. When Reconstituting the Apricots begins: say "The apricots slowly begin to plump up again." Reconstituting the Apricots ends when the dried apricots are not in a container which contains boiling water. Every turn: if dried apricots have been in a container which contains boiling water for ten turns begin; say "The apricots have turned plump(ish)."; now the apricots are reconstituted; record "reconstituting apricots" as achieved; end if. Test sautee with "peel onions / cut onions / get onions / put onions in pan / get sage / wash sage / cut sage / wait / wait / wait / wait / wait / wait / wait / get pan". Test apricots with "get kettle / open kettle / get apricots / put apricots in kettle / put kettle on stove / wait / wait / wait / wait / wait / wait / wait / wait / wait / wait / wait / wait / wait / wait / wait / wait / wait". Test chicken with "open refrigerator / get chicken / open drawer / get mallet / hit breast". Test cheese with "get scissors / get cheese / unwrap cheese". Test me with "full score / test sautee / full score / test apricots / full score / test chicken / full score / test cheese / full score". And... at that point you're a lot less close to being done than you think. The filling -- onions, sage, apricot, and cheese -- must be assembled and put in the chicken breasts; these tied up in string; each roll dipped in egg yolk and rolled in panko crumbs; these arranged in the Calphalon pan and baked. Then later, the whole retrieved from the oven, and the breasts transferred to a plate while we deglaze the pan and concoct the sauce with the chicken broth, wine, butter, etc. Then the chicken is sliced and plated, and the sauce poured over top. Usually one also wants a side dish or two. A number of things can go interestingly wrong in this process, of course, and implementing it would require, among other things, an intelligent management of all the possible mixtures that result.

Previous | Contents | Next