| Chapter 18: Rulebooks |

| 18.15. Consider is not the same as follow

"Consider" looks as if it duplicates the effect of "follow", but in fact it is a simpler business altogether. Unlike "follow", it doesn't get side-tracked into consulting the procedural rules, with all of the resultant change which might result from that. This is a finicky but important distinction. A great many rules and rulebooks make use of each other when actions are being processed, but we only want the procedural rules to be looked at once, right at the start.

A general guideline here is that if rule A needs to use rule B, and both are engaged in the same basic activity - for instance both are basically processing actions - then A should use "consider B". Only if B is something entirely unrelated should A use "follow B". Thus:

> Instead of switching on the machine, follow the appraisal rules.

...is a case where rule A, the one about processing the "switch on the machine" action, is engaged in a completely different activity to rule B, which is all about telling the player what a wonderful amount of progress has been made so far. "Follow" is therefore appropriate.

300
| Example Patient Zero People who wander around the map performing various errands, and in the process spread a disease which only the player can eradicate.

> "Patient Zero" Use the serial comma and no scoring. Understand "about" as asking for information. Asking for information is an action out of world. Carry out asking for information: say "An implementation of the following creative brief: People wander around some small map, on errands. One, sad to tell, has Gelato's Syndrome, a tragic condition turning one's skin the colour of a random flavour of ice cream (raspberry ripple, neapolitan, etc.). When two people are in the same room, there's a 1/3 chance that an infected person will infect a non-infected one. The player can cure any single person: victory condition - to stamp out the disease." When play begins: say "Gelato's Syndrome. It's struck, and it's struck hard. In these sticky summer months, there's no telling who will contract the disease next."; change the command prompt to "[if the destination of the player is not blank](heading to [destination of the player]) [end if]>". Section 1 - Errands The current actor is a person which varies. The current owner is a person which varies. Every turn: if player is active, follow the character movement rules. Every turn: change the last person named to the player; change the last thing named to the player; now every person is active. A person can be active or passive. The player is passive. The character movement rules are a rulebook. The first character movement rule: change group size to 1; change the last person named to the player; change the last thing named to the player; now the player is passive. A character movement rule: repeat with mover running through innocent people begin; change the current actor to the mover; consider the shopper rules; now the current actor is passive; end repeat; consider the movement reporting rule. A character movement rule: repeat with next mover running through mercantile people begin; change the current owner to the next mover; consider the shopowner rules; now the current owner is passive; end repeat; consider the infection rule. To decide whether movement has not yet occurred: if the player is passive, no; yes. Definition: a person is mercantile if it owns a room. Definition: a person is innocent if it is not mercantile and it is not the player. The shopowner rules is a rulebook. A shopowner rule: let the shop be a random room owned by the current owner; if the shop is air-conditioned and an open door (called the escape) protects the shop, try the current owner trying closing the escape instead. Report someone trying closing a door when the person asked owns the location: say "[The person asked], muttering darkly about air-conditioning and electricity, closes [the noun]." instead. Report Vanessa trying closing the metal door when the metal door is visible: if Vanessa is visible, say "Vanessa watches serenely as the metal door slides automatically back in place, sealing Cold Comfort." instead; otherwise say "The metal door slides heavily back into place." instead. A shopowner rule: if the location of the current owner encloses a submitted artwork (called the target) begin; try the current owner trying filing the target; end if. Filing is an action applying to one thing. Before someone trying filing something which is not carried by the person asked: try the person asked trying taking the noun instead. Carry out someone trying filing: if the person asked does not carry the noun and the person asked is visible, say "[The person asked] tries unsuccessfully to get [the noun]." instead; remove the noun from play. Report someone trying filing: say "[The person asked] registers [the noun] and files it away." The shopper rules is a rulebook. A shopper rule: if the current actor carries something (called the problem), try the current actor trying resolving the problem instead. A shopper rule: if the current actor is not in the pool hall and the air conditioner is switched on begin; try the current actor trying approaching the pool hall; otherwise; let way be a random direction; try the current actor trying going the way; end if. Definition: a room is air-conditioned: if it is outdoors, no; if it is the Pool Hall and the air conditioner is switched off, no; if it is protected by a door, yes; no. Protection relates a door (called X) to a room (called Y) when the front side of X is Y or the back side of X is Y. The verb to protect (it protects, they protect, it protected, it is protected) implies the protection relation. Ownership relates one person to various rooms. The verb to own (he owns, they own, he owned, it is owned) implies the ownership relation. Resolving is an action applying to one thing. An artwork is a kind of thing. Before printing the name of an artwork, say italic type. After printing the name of an artwork, say roman type. An artwork can be submitted or reserved. A book is a kind of artwork. Before someone trying resolving a book when the person asked is not in the Public Library: try the person asked trying approaching the Public Library instead. Carry out someone trying resolving a book: move the noun to the Public Library; now the noun is submitted. Report someone trying resolving a book: say "[The person asked] turns in [the noun]." Before listing contents: group books together. Before grouping together books: say "books entitled ". A stamped envelope is a kind of thing. Before someone trying resolving a stamped envelope when the person asked is not in the Post Office: try the person asked trying approaching the Post Office instead. Carry out someone trying resolving a stamped envelope: remove the noun from play. Report someone trying resolving a stamped envelope: say "[The person asked] slips [a noun] into the outgoing mail slot." Instead of someone trying resolving a stamped envelope when the person asked carries at least two stamped envelopes: if the person asked is visible, say "[The person asked] shoves into the mail slot [a list of stamped envelopes carried by the person asked]."; repeat with item running through stamped envelopes carried by the person asked begin; remove item from play; end repeat. A DVD is a kind of artwork. Before someone trying resolving a DVD when the person asked is not in the Rental Store: try the person asked trying approaching the Rental Store instead. Carry out someone trying resolving a DVD: now the noun is submitted; move the noun to the Movie Rental Store. Report someone trying resolving a DVD: say "[The person asked] returns [the noun]." Instead of someone trying resolving a DVD when the person asked carries at least two DVDs: if the person asked is visible, say "[The person asked] turns in [a list of DVDs carried by the person asked]."; now every DVD carried by the person asked is submitted; now every DVD carried by the person asked is in the location of the person asked. Before listing contents: group DVDs together. Before grouping together DVDs: say "DVDs of ". Approaching is an action applying to one thing. Carry out someone trying approaching: let the way be the best route from the location of the person asked to the noun, using doors; if the way is a direction, try the person asked trying going the way; otherwise stop the action. A coupon is a kind of thing. Carry out someone trying resolving a coupon: try the person asked trying giving the noun to Vanessa. Procedural rule: if the person asked is not the player, ignore the block giving rule. Before someone trying resolving a coupon when the person asked is not in Cold Comfort: try the person asked trying approaching Cold Comfort instead. After someone trying giving a coupon to Vanessa: let the reward be a random ice cream cone; let the new flavor be a random infection color; change the infection color of the reward to the new flavor; move the reward to the person asked; remove the noun from play; if Vanessa is visible, say "[The person asked] trades in [the noun] and receives [a reward] from Vanessa." Infection color is a kind of value. The infection colors are french vanilla, whole-bean vanilla, mint, chocolate, dark chocolate, chocolate chip, chocolate fudge, mint chocolate chip, chocolate chocolate chip, triple chocolate, white chocolate, white chocolate chip, aztec cocoa-chili, raspberry ripple, neapolitan, rum raisin, dulce de leche, strawberry chunk, rocky road, blackberry sorbet, lemon sherbet, lime ice, caramel swirl, mango, saffron silk, and cookie dough cream. To say list of flavors: let current color be french vanilla; while current color is not cookie dough cream begin; say "[current color], "; change current color to the infection color after the current color; end while; say "and [current color]". Understand "ask vanessa for [flavored ice cream]" as buying the flavor. Understand "buy [flavored ice cream]" as buying the flavor. Buying the flavor is an action applying to one infection color. Check buying the flavor: if the player can see Vanessa, do nothing; otherwise say "It would help if you were in the presence of an ice cream salesperson." instead. Carry out buying the flavor: say "'Do you have a coupon?' Vanessa demands. You admit you do not. 'No [infection color understood] for you!'" Understand "ice cream" or "cream" or "ice" or "sherbet" or "sorbet" as "[ice cream]". Understand "[infection color]" or "[infection color] [ice cream]" as "[flavored ice cream]". An ice cream cone is a kind of thing. An ice cream cone is always edible. An ice cream cone has an infection color. An ice cream cone can be half-eaten or fresh. Understand the infection color property as referring to an ice cream cone. Carry out someone trying resolving an ice cream cone: try the person asked trying eating the noun instead. Instead of someone trying eating a fresh ice cream cone: change the noun to half-eaten; if the person asked is visible, say "[The person asked] licks [the noun]." Report someone trying eating an ice cream cone: say "[The person asked] pops the end of [the noun] into [if the person asked is female]her[otherwise]his[end if] mouth and swallows." instead. Before printing the name of an ice cream cone: say "[if half-eaten]half-eaten [end if][infection color] ". Section 2 - Infection Rules This is the infection rule: if an infected person (called typhoid mary) can see a clean person (called random bystander) and a random chance of 1 in 3 succeeds begin; try typhoid mary trying sneezing on the random bystander; end if. A person can be infected or clean. A person has an infection color. Every turn: if the player is infected, say "You feel itchy." Definition: a person is other if it is not the player. Definition: a person is another if it is other. When play begins: change right hand status line to "Sick: [number of infected people]/[number of people]". Every turn: if every person is infected, end the game saying "Everyone succumbs"; if every person is clean, end the game saying "The Syndrome is eradicated". Understand "sneeze on [something]" as sneezing on. Sneezing on is an action applying to one thing. Check sneezing on: if the player is clean, say "You're not sickly." instead; if the noun is the player, say "Ew." instead; if the noun is not a person, say "[The noun] cannot be infected." instead. Carry out sneezing on: now the noun is infected; change the infection color of the noun to a random infection color. Carry out someone trying sneezing on: now the noun is infected; change the infection color of the noun to a random infection color. Report sneezing on: say "Unable to control yourself, you sneeze on [noun]."; Report someone trying sneezing on: say "[The person asked] sneezes on [if the noun is the player]you[otherwise][noun][end if]!"; Understand "inject [someone] with [something]" as injecting it with. Understand "inject [someone] with [syringe]" as injecting it with. Understand "use [syringe] on [someone]" as injecting it with. Understand the commands "innoculate" and "vaccinate" as "inject". Injecting it with is an action applying to two things. Check injecting it with: if the second noun is not the syringe, say "[The second noun] cannot inject anything." instead; if the noun is clean begin; if the noun is the player, say "You're not infected yet." instead; say "[The noun] is not infected, and the syringe contains a cure, not a vaccine." instead; end if. Carry out injecting it with: now the noun is clean. After injecting the player with something: say "You inject yourself, wincing at the sting. But the itching fades almost at once." Report injecting it with: say "You inject [the noun], who is now cured (but could easily be reinfected)." Section 3 - Geography To decide what direction is the way through (frame - a door): let far side be the other side of frame; let way be the best route from the location to the far side, using even locked doors; if way is a direction, decide on the way; decide on inside. Include Locksmith by Emily Short. Understand "go to/toward/into [any room]" as going toward. Understand "enter [any room]" as going toward. A person has a room called the destination. Going toward is an action applying to one thing. Check going toward: if the noun is the location, say "You're already in [the location]." instead. Carry out going toward: change the destination of the player to the noun; let heading be the best route from the location to the noun, using even locked doors; if heading is not a direction, say "You can't think how to get there from here." instead; try going heading; if the location is the destination of the player, change the destination of the player to blank. Instead of waiting when the destination of the player is not blank: if the destination of the player is the location begin; change the destination of the player to blank; otherwise; try going toward destination of the player; if the location is the destination of the player, change the destination of the player to blank; end if. Understand "stop" or "cease" as stopping. Stopping is an action applying to nothing. Carry out stopping: change the destination of the player to blank. Report stopping: say "You stop in your tracks." After going to an air-conditioned room: say "You step into the mercifully air-conditioned surroundings of..."; continue the action. After going from an air-conditioned room: say "You emerge from the air-conditioning into heat like a wall..."; continue the action. Instead of listening to an air-conditioned room: say "The air-conditioning hums softly." The Alfred Cralle Pool Hall is a room. "The town's most popular gathering-place, the pool hall is decorated in honor of the inventor of the ice cream scoop." The air conditioner is a device in the Pool Hall. "[if switched off]An air conditioner sits in the corner, unhappily inert[otherwise]The air conditioner hums briskly[end if]." The felt door is west of the Pool Hall. The felt door is a door. The felt door is open. The felt door is lockable and unlocked. The key to the city unlocks the felt door. The description of the felt door is "It has a prominent lock, designed for an old-fashioned key." After locking a door with something in the presence of an other person (called audience): say "[The audience] looks a little non-plussed when you lock [the noun], but shrugs." Nancy Johnson Memorial Square is west of the felt door. The description of Nancy Johnson Memorial Square is "Waves of August heat rise from the pavement: more than once you've had the fancy that your shoes are simply going to stick. At the center of the square, rubbed to a brownish polish by many adoring hands, is the statue of Mrs. Nancy Johnson of New Jersey." The statue is scenery in Memorial Square. Understand "nancy" or "johnson" or "mrs" as the statue. The description of the statue is "Mrs. Johnson is pictured with a hand-cranked ice cream freezer tucked under one arm. Her other hand grips an ice cream scoop, ready to serve frozen dessert to the huddled masses." A hand-cranked ice cream freezer is part of the statue. The description is "The hand-cranked ice cream freezer was Mrs. Johnson's invention in 1846, though it was William Young who had the sense to patent the thing in 1848." The scoop is part of the statue. The description of the scoop is "An anachronism: Alfred Cralle would not invent the tool until 1897." The Post Office is northwest of Nancy Johnson Memorial Square. "Service at the post office is on the slow side since everything went automated." The slot is scenery in the post office. The slot is a container. Carry out inserting something into the slot: remove the noun from play. Report inserting something into the slot: say "[The noun] falls out of sight, and you know you will never see it again." Hamwi Street is northeast of an iron gate. "A U-shaped street running from Main Street around to the Memorial Square, Hamwi Street was recently added by ambitious city planners. The small and straggly line of trees has yet to grow enough to provide perceptible shade, so the street is even hotter and more unforgiving than the other parts of town." The iron gate is northeast of Nancy Johnson Memorial Square. The iron gate is a door. It is lockable and unlocked. Before printing the name of the iron gate while not opening or closing or locking or unlocking: if the person asked is the player begin; if the gate is open, say "open "; otherwise if the gate is locked; say "locked "; otherwise if the gate is closed; say "closed "; end if. Cold Comfort Ice Cream is north of a metal door. The metal door is north of Hamwi Street. A poster is fixed in place in Cold Comfort. "A poster fills one wall with the blazing promise of treats to come." The description of the poster is "Coming soon! Thai ice creams! Durian, jackfruit, taro, and coconut flavors!" The metal door is a door. "A frosty metallic door separates [the location] from [the other side of the metal door]." The metal door is lockable and unlocked. The key to the city unlocks the metal door. Marciony Street is southeast of Nancy Johnson Memorial Square. "A semi-circular terrace, named somewhat fancifully after one claimant to the invention of the ice cream cone -- though Hamwi Street competes for the same honor. There are wedges of cool shadow here and there thanks to the buildings, but for the most part the southern exposure keeps Marciony unpleasantly hot." The Movie Rental Store is west of a glass door. The glass door is a door. It is west of Marciony Street. The glass door is lockable and unlocked. The key to the city unlocks the glass door. Main Street is southeast of Hamwi Street. Main Street is northeast of some bronze gates. The emergency box is in Main Street. The emergency box is fixed in place. "A fire-red box with a glass front faces the sidewalk, with 'In case of emergency, BREAK GLASS' lettered on it." The emergency box is closed and transparent. Understand "glass" as the box. Instead of attacking the closed emergency box: say "You hit the emergency box, which shatters open."; change the emergency box to open. Instead of attacking the open emergency box: say "The glass has already been thoroughly broken." The syringe is in the emergency box. The description of the syringe is "It contains the cure for Gelato's Syndrome. You can inject anyone you like with it." The bronze gates are northeast of Marciony Street. The bronze gates are a door. The bronze gates are lockable and unlocked. The description of the bronze gates is "Erected during the milk-taint revolution of 1937, they were designed to keep Main Street safe from the depredations of dairy-starved rioters." The Public Library is east of Main Street. "Built in the 1920s during the height of the dairy boom, the public library has lush pink velvet seats, marble walls the color of fresh cream, and a motif of cherries carved around every doorframe. An incongruous sign hangs from the ceiling." The incongruous sign is scenery in the Public Library. The description of the incongruous sign is "Eating and drinking in the library is STRICTLY PROHIBITED." Town Hall is southeast of Main Street. "Town Hall was built during the slow days of the ice-cream bust, and therefore it is as joyless and utilitarian as the Public Library is ridiculous. Unwilling to be reminded of their pain, the inhabitants steered clear of any decoration that might remotely be construed to resemble a scoop of anything: so there are no curves, only disciplined right angles." The key to the city is in Town Hall. It unlocks the iron gate. It unlocks the bronze gates. The description of the key to the city is "A skeleton key." A room can be indoors or outdoors. The Post Office, the Alfred Cralle Pool Hall, the Store, Cold Comfort, Town Hall, and the Library are indoors. Use full-length room descriptions. After looking in an outdoors room: let started printing be 0; if an indoors room is adjacent begin; let started printing be 1; say "From here you can head into [the list of adjacent indoors rooms][if a door is unmentioned], or go through [the list of visible unmentioned doors]. [run paragraph on]"; end if; if an outdoors room is adjacent begin; say "You could[if started printing is 1] also[end if] go "; let count be the number of adjacent outdoors rooms; let index be count; repeat with next room running through adjacent outdoors rooms begin; let way be the best route from the location to the next room; say "[way] to [the next room]"; decrease index by 1; make delimiter index of count; end repeat; otherwise; if started printing is 1, say paragraph break; end if. Before exiting when the player is in an indoors room: if the player can see a door (called nearest exit), try entering the nearest exit instead; repeat with way running through directions begin; let next room be the room way from the location; if the next room is a room, try going way instead; end repeat. Blank is a room. The destination of the player is Blank. Blank contains 15 ice cream cones. Section 4 - Other Players Vanessa is a woman in Cold Comfort. Vanessa owns Cold Comfort. Francine is a woman in the Public Library. Francine carries a book called Phlox for Phyllis. Francine carries a stamped envelope called a pink stamped envelope. Lewis is a man in the Alfred Cralle Pool Hall. Lewis carries 3 stamped envelopes. Lewis carries a book called Idiot's Guide to Dating. Lewis carries a book called How to Meet Women. Lewis carries a book called Seduction in Three Easy Steps. Lewis carries a DVD called Sleepless in Seattle. Gene is a man in Nancy Johnson Memorial Square. Gene carries a stamped envelope. Gene carries a DVD called Casablanca. Gene carries a coupon. Rhoda is a woman in Marciony Street. Rhoda carries a book called The Marciony Street Murders. Rhoda carries a DVD called Unsolved Serial Killings XVIII. Rhoda carries a stamped envelope called a squashy package. Martin is a man in Main Street. Martin carries a DVD called The Lifecycle of the South Sea Tortoise. Martin carries a coupon. Antony is a man in Movie Rental. Antony carries a coupon. Antony carries a stamped envelope called a postcard. Shelby is a man in the Town Hall. Shelby carries a DVD called Conducting An Orderly Meeting. Shelby carries 5 stamped envelopes. Shelby carries an ice cream cone. Shelby carries a coupon. Christopher is a man in the Library. Christopher owns the Library. Linnea is a woman in the Alfred Cralle Pool Hall. Linnea owns the Alfred Cralle Pool Hall. Ned is a man in the Movie Rental Store. Ned owns the Movie Rental. After printing the name of someone (called target) while listing contents: if the target owns the location of the target, say " (the owner)". The description of a person is usually "[The noun] [if the noun is clean]looks healthy[otherwise]is the color of [infection color of the noun][end if]." After examining another person who is carrying something: say "[if the noun is female]She[otherwise]He[end if] is carrying [a list of things carried by the noun]." When play begins: let Patient Zero be a random other person; now patient zero is infected. This is a light variation of a previous example, but we use it here because it is convenient: Section 5 - Conversation A person has a table-name called conversation. Instead of asking someone about something: let the source be the conversation of the noun; if topic understood is a topic listed in source begin; if there is a turn stamp entry begin; say "You have already heard that [summary entry]."; otherwise; change turn stamp entry to the turn count; change the character entry to the noun; say "[reply entry][paragraph break]"; end if; otherwise; say "[The noun] stares at you blankly."; end if. Instead of telling someone about something: try asking the noun about it. Understand "recap" or "recall" or "review" as recalling conversations. Recalling conversations is an action applying to nothing. Carry out recalling conversations: repeat with speaker running through other people begin; let source be the conversation of the speaker; sort source in turn stamp order; say "[The speaker] has so far told you: [line break]"; let index be 0; repeat through source begin; if there is a turn stamp entry and the speaker is character entry begin; let index be 1; say " [summary entry][line break]"; end if; end repeat; if index is 0, say " absolutely nothing[line break]"; say line break; end repeat. The conversation of a person is usually Table of General ChitChat. Table of General ChitChat
> topic | reply | summary | turn stamp | character
> "weather/heat/warmth" | "'It's appalling, isn't it? You'd think we didn't pay our taxes.'" | "that the weather is appalling" | a number | a person
> "sun/sunlight" | "'Good thing the town mostly switched to solar power, har, har.'" | "that the town is mostly relying on solar power"
> "rain" | "'Nope, there isn't going to be rain for 132 days,' replies [the noun]." | "that rain is not expected for another 132 days"
> "snow/hail/ice" | "This hilarious sally is greeted with hoots of laughter only." | "that the concept of snow is downright laughable"
> "disease/sickness/illness/syndrome" | "You get a cold, fixed stare in response. 'That's not funny,' [the noun] replies finally." | "that discussing the disease is more or less taboo"
> "cold comfort" | "'If you haven't tried it, you should,' says [the noun]. 'Best ice cream in town, and that's saying something, you bet.'" | "that Cold Comfort has the best ice cream in town"
> "town/city/village" | "'Yeah, it's a mite odd,' allows [the noun]. 'Not to everyone's taste, like...' [the noun as pronoun] considers for a moment. 'Like ginger ice cream. Big pieces of crystallized ginger... not everyone likes that.'" | "that the town is a mite odd"
> "forecast/weatherman" or "weather forecast/man" | "'Oh, the weather man's gotten a lot more reliable since the gummint started making it for us,' says [the noun]. 'Now he just reads off the schedule on the air every morning. Pretty much takes the fun right out of the news, if you ask me.'" | "that the weather is all generated by schedule"
> "taxes/tax" or "weather tax" | "A snort. 'You'd think for the rates we pay we'd get something a little pleasanter, don't you?'" | "that the weather tax really ought to be paying for something nicer than what you get"
> "job/employment/work" | "'[if the noun owns a room (called the shop)]I own [the shop],' replies [the noun][otherwise]Work at the creamery, like most folk around here,' answers [the noun]." | "this and that about employment in town"
> "book/books/reading" | "'The Public Library has a good selection, excepting only the cookbook section,' says [the noun]. 'That got censored way back when-- well, way back.'" | "that the Public Library has a good collection, except for the cookbook section"
> The conversation of Vanessa is the Table of Vanessa Chatter. Table of Vanessa Chatter
> topic | reply | summary | turn stamp | character
> "ice cream" or "sorbet/sherbet/flavor/flavors/flavour/flavours/ice/ices" | "'The flavors are [list of flavors],' she responds promptly, without needing to draw breath." | "that the flavors are [list of flavors]" | a number | a person
> After reading a command: while player's command includes "the", cut the matched text. This strips 'the' out of the command, so that ASK PERSON ABOUT THE RAIN will be understood as well as ASK PERSON ABOUT RAIN. Now we try something a bit unusual. Inform on its own will report each action on its own line, so that each character who walks into or out of a room will be described in a separate paragraph. This is usually fine, but in a game with a lot of characters moving around simultaneously, it can become a bit overwhelming. Instead, we may want to condense these reports into a single line, such as "Ben and Jerry enter from the south". The following accomplishes that goal by replacing some of the reporting rules, storing the information in a table, and then reading the table back later, once all the character movement has been resolved and the reports can usefully be collated: Section 6 - Movement Description A person has some text called walk style. The walk style of a man is usually "stride". The walk style of a woman is usually "strut". The walk style of Gene is "[if a random chance of 1 in 2 succeeds]wander[otherwise]stroll[end if]". The walk style of Francine is "waddle". The walk style of Antony is "scamper". The walk style of Rhoda is "sashay". Table of Visible Exits
> character | second | third | heading chosen | total
> a person | a person | a person | a direction | a number
> with 10 blank rows.
> Table of Visible Entrances
> character | second | third | heading chosen | total
> a person | a person | a person | a direction | a number
> with 10 blank rows.
To clear (current table - a table-name): repeat through current table begin; blank out the whole row; end repeat; To tidy departures of (current table - a table-name): let next direction be up; repeat through current table begin; if heading chosen entry is next direction begin; let accomplice be character entry; choose row with heading chosen of next direction in the current table; if total entry is 1 begin; change second entry to accomplice; change total entry to 2; end if; if total entry is 2 begin; if second entry is accomplice begin; do nothing; otherwise; change third entry to accomplice; change total entry to 3; end if; end if; choose row with character of accomplice in the current table; blank out the whole row; otherwise; let next direction be heading chosen entry; end if; end repeat. A door has a person called last opener. Report someone trying opening a door: change group size to 1; change the last opener of the noun to the person asked; if the person asked is visible, say "[The person asked] opens [the noun]. [run paragraph on]" instead; otherwise say "[The noun] opens from the other side. [run paragraph on]" instead. Report someone trying going through a door (called route): if the person asked is not the last opener of the route, continue the action; if the person asked is the last person named, say "[The person asked as pronoun]"; otherwise say "[The person asked]"; say " [if the person asked is in the location]comes[otherwise]goes[end if] through[if the last thing named is not the route] [the route][end if]." instead. The last thing named is a thing that varies. Before printing the name of something (called target) which is not a person: change the last thing named to the target. Report someone trying going a direction: if the person asked is in the location, choose a blank row in the table of visible entrances; otherwise choose a blank row in the table of visible exits; change character entry to the person asked; change total entry to 1; if the person asked is in the location, change heading chosen entry to the opposite of the noun; otherwise change heading chosen entry to the noun; stop the action. This is the movement reporting rule: sort the Table of Visible Entrances in heading chosen order; tidy departures of the table of visible entrances; sort the Table of Visible exits in heading chosen order; tidy departures of the table of visible exits; let total row count be the number of filled rows in the Table of Visible Entrances plus the number of filled rows in the Table of Visible Exits; if total row count is 0, rule succeeds; generate descriptions from the Table of Visible Entrances; generate descriptions from the Table of Visible Exits; clear the Table of Visible Entrances; clear the Table of Visible Exits. To generate descriptions from (current table - a table-name): let count be the number of filled rows in the current table; if count is 0, rule succeeds; let index be count; repeat through the current table begin; let accomplice be character entry; if character entry is a person, change character entry to marked for listing; if there is a second entry and second entry is a person, change second entry to marked for listing; if there is a third entry and third entry is a person, change third entry to marked for listing; let target be the room the heading chosen entry from the location; if total entry is 3, say "[The character entry], [the second entry][optional comma] and [the third entry] "; if total entry is 2, say "[The character entry] and [the second entry] "; if total entry is 1 begin; if the character entry is the last person named, say "[The character entry as pronoun] "; otherwise say "[The character entry] "; end if; if total entry is 1, say "[walk style of the character entry]s "; otherwise say "walk[if total entry is 1]s[end if] "; if the character entry is in the location begin; if location is indoors and target is indoors, say "over from "; if location is outdoors and target is indoors, say "out of "; if location is indoors and target is outdoors, say "in from "; if location is outdoors and target is outdoors, say "over from "; otherwise; if location is indoors and target is indoors, say "over to "; if location is outdoors and target is indoors, say "into "; if location is indoors and target is outdoors, say "out [if a door is visible][the random visible door][end if] to "; if location is outdoors and target is outdoors, say "over to "; end if; if target is outdoors, say "[the heading chosen entry]"; otherwise say "[the target]"; if the total entry is 1 and count is 1 and accomplice carries something, say ", carrying [a list of things carried by the accomplice]"; decrease index by 1; make delimiter index of count, continuing; change group size to total entry; end repeat; if a marked for listing person is infected begin; [eliminate the case in which we have already seen this description because we just typed LOOK and the patient was in the room at the time] if looking and a marked for listing person is not in the location begin; clear marked people; say paragraph break; otherwise; describe patients; end if; otherwise; clear marked people; say paragraph break; end if. The last person named is a person that varies. Before printing the name of a person (called target): change the last person named to the target. Group size is a number that varies. Group size is 1. To clear marked people: repeat with named party running through people begin; change the named party to not marked for listing; end repeat. Before listing nondescript items: if the number of people who are marked for listing is 0, make no decision; say "You can see [a list of people who are marked for listing] here. "; change group size to the number of people who are marked for listing; describe patients. To describe patients: if every marked for listing person is infected and at least three people are marked for listing begin; say "They are all sick as dogs, every one."; clear marked people; rule succeeds; otherwise; if the number of people who are marked for listing is greater than two and the number of infected people who are marked for listing is greater than the number of clean people who are marked for listing begin; say "Only [the list of clean people who are marked for listing] currently remain[if the number of clean people who are marked for listing is 1]s[end if] untainted."; clear marked people; rule succeeds; end if; end if; let count be the number of marked for listing other people who are infected; if count is 0 begin; say paragraph break; make no decision; end if; let index be count; repeat with patient running through marked for listing other people who are infected begin; if index is count begin; if count is 1 and the patient is the last person named begin; say "[The patient as pronoun]"; otherwise; say "[The patient]"; end if; otherwise; say "[the patient]"; end if; say " [looks as though dipped in for index] [infection color of the patient]"; decrease index by 1; make delimiter index of count; end repeat; clear marked people. To say (named character - a man) as pronoun: if group size is 1, say "He"; if group size is 2, say "The latter"; if group size is greater than 2, say "The last". To say (named character - a woman) as pronoun: if group size is 1, say "She"; if group size is 2, say "The latter"; if group size is greater than 2, say "The last". To say looks as though dipped in for (index - a number): let divider be the number of filled rows in the Table of Dipping Phrases; if index is greater than 4, let index be the remainder after dividing index by divider; choose row index in the Table of Dipping Phrases; say dipping entry. Table of Dipping Phrases dipping "looks as though dipped in" "could have been rolling in" "has a bad case of" "suffers from" "contracted a virulent" A door is usually scenery. The next part could be simpler, but for rigor we will write it in such a way that it will work whether or not the serial comma is in use. This requires some extra work; feel free to skip down to the scenario if you prefer. To make delimiter (index - a number) of (count - a number), continuing or halting: if index is 0 begin; if continuing, say ". [run paragraph on]"; otherwise say "."; otherwise if index is 1; if count is 2, say " and "; otherwise say "[optional comma] and "; otherwise; say ", "; end if. To say optional comma: if using the serial comma option, say ","; otherwise do nothing. Test me with "go to cold comfort / z / z / z / z / ask vanessa for french vanilla / ask vanessa for chocolate / ask vanessa about flavors / ask vanessa for chocolate chocolate chip". Because so much of this game is randomized, it will not be possible to provide a test suite that systematically solves it. A good strategy is to go to Main Street, get the syringe; go to the Town Hall and get the key; then visit the shops, inject everyone, and lock them in when they've all been injected. Then go to the Pool Hall, turn on the air conditioner, and wait for the remaining parties to show up.

Previous | Contents | Next