Child's Play

An interactive fiction by Stephen Granade (2007) - the Inform 7 source text

Chapter 4 - Tabletime
Tabletime is a scene. Tabletime begins when Playtime ends. Tabletime ends when the number of filled rows in the Table of Tabletime-Cheerio-Reaching is 0.
When Tabletime begins:
   [Clear out everyone's stuff]
   set the kids to a ground state;
   now every playmate is passive;
   now every playmate is in At the Table;
   now every parent person is in At the Table;
   remove the backpack from play;
   remove the plain white onesie from play;
   remove the fog of grump from play;
   display chapter head "Chapter 2" with subhead "Snacktime";
   sort the Table of Tabletime-Baby-Chatter in random order;
   change chatter count to 0;
   say "And it's just like you expected. The mom scoops you and the toy up and the two of you dangle in mid-air while she removes the baby gate by the loveseat and goes around behind the loveseat. There's a cabinet back there, she pushes down the baby lock at the top of the cabinet door and opens the door and in goes your toy.
You would be all into getting the toy back except everyone decides now is the time to have a snack so a bunch of toys get piled in that small open area in the living room and you and Zoe and Cassie and Watson and Jemison are dragged into the kitchen and out comes the food.";
   move the player to At the Table.
When Tabletime ends:
   change chatter count to 0;
   say "Finally all of this feeding is over and the Cheerios get put away and everyone gets wiped up with baby wipes before getting dumped back in the living room."
At the Table is a room. "Your high chair is not way super high since it only gets you up to the level of the kitchen table but that is still pretty high. It lets you see around the table which is better than when you are on the floor and cannot even see the top of the table[note purpose-of-interludes]."
Instead of rocking in At the Table, say "You rock and rock and try to tip your chair over but it is too safely designed. The mom must read Consumer Reports or something."
Instead of waving the high chair, try rocking.
Instead of going or entering or exiting or getting off in At the Table, say "You are all strapped into your high chair so you are going nowhere."
Instead of doing something other than examining or smelling to something during Tabletime:
   if the noun is the player or the high chair or the food spoon, continue the action;
   if the player encloses the noun, continue the action;
   say "With you strapped into your high chair you cannot reach [the noun]."
[All playmates have a pre-writing a paragraph rule that does nothing during Tabletime. By hooking onto the end of Jemison's rule, we can describe them all.]
After pre-writing a paragraph about Jemison during Tabletime: say "They are all being fed. [run paragraph on]"
Your high chair is scenery in At the Table. The description is "The high chair is what holds you up when it is time to eat and it has straps that hold you in." Understand "strap" or "straps" as your high chair. Instead of opening your high chair, say "The chair straps are too complex for your tiny fat fingers." Instead of climbing your high chair, try exiting. Before taking off your high chair, try opening your high chair instead.
Prune-tasting is a one-time deal.
The food spoon is in At the Table. "In front of you is this spoon full of food that the mom wants you to eat." The description is "The spoon [if prune-tasting is not over]looks like it [end if]is all full of chopped [if prune-tasting is not over]nastiness. Prunes, maybe[otherwise]prunes. Bleeeeeeeach[end if]." Understand "prune" or "prunes" as the food spoon.
Instead of smelling the food spoon, say "It has this fruity smell to it." Instead of pushing or pulling or taking or attacking or touching the food spoon, say "You reach for it but the mom moves it away and says 'Ah ah ah! No hands! Eat it, don't play with it!'" [This next bit needs to be "before" to override the taking requirements.] Before eating or chewing or tasting the food spoon: say "You open your mouth and the mom spoons in the prunes[if 1 out of 3] and they slide down your throat[end if]. Yeuch. And if that isn't bad enough, the spoon goes away and comes back with more prunes[if prune-tasting is not over]! You are just like Sisyphus here.[otherwise]![end if]"; now prune-tasting is over; stop the action.
Instead of spitting up when the player is in At the Table, say "You start to spit up but the mom is right there wiping up your spit."
Instead of spitting up on something when the player is in At the Table, try spitting up.
The food-bite is scenery in At the Table. Setting action variables for doing something to the food-bite when not taking: change the noun to the food spoon. Before taking the food-bite, try eating the food spoon instead. Understand "bite" as the food-bite.
The kitchen table is scenery in At the Table. "It is round and wooden." Understand "round" and "wooden" as the kitchen table.
The pile of Cheerios is a thing. "Those sure are a bunch of Cheerios spilled everywhere." The description is "Oaty o's of pure goodness." Understand "cheerio" as the pile. Instead of smelling the pile of Cheerios, say "The Cheerios smell like awesomeness incarnate."
Before eating or tasting the pile of Cheerios when Tabletime is not happening: instead say "NOM NOM NOM."
Instead of taking the pile of Cheerios: abide by the check taking rulebook; say "You take a Cheerio but you cannot stop yourself, you have to eat it NOM NOM NOM.";
Cheerio-message-flag is a number that varies.
An every turn rule: now cheerio-message-flag is 0.
[Sometimes this rule can fire multiple times in a turn as commands are converted to other commands. Avoid that by using a flag that is set when the message is printed and reset at the beginning of every turn.]
Before doing something other than waiting or visiting when the pile of Cheerios is not acted upon and the pile of Cheerios is present (this is the Cheerios message rule):
   if your favorite toy is not acted upon and cheerio-message-flag is 0 begin;
   say "(tearing yourself away from the Cheerios)[command clarification break]";
   now cheerio-message-flag is 1;
   end if.
[A report going rule when the player is in the presence of a playmate and the player is in the presence of the pile of Cheerios:]
A report going rule when the pile of Cheerios is in the last location of the player and a playmate is in the last location of the player:
   say "You have to push your way past [a list of playmates in the last location of the player] thanks to those Cheerios and that slows you down."
Every turn during Tabletime:
   if the pile of Cheerios is not in At the Table begin;
   [chatter count is 0 to begin with so we skip the first turn of Tabletime]
   if chatter count is not 0 begin;
   choose row chatter count in the Table of Tabletime-Parent-Chatter;
   say "[chatter entry][if chatter count is less than the number of rows in the Table of Tabletime-Parent-Chatter] Meanwhile, [otherwise][paragraph break]";
   if chatter count is less than the number of rows in the Table of Tabletime-Parent-Chatter begin;
   choose row chatter count in the Table of Tabletime-Baby-Chatter;
   say "[chatter entry][paragraph break]";
   otherwise;
   move the pile of Cheerios to At the Table;
   end if;
   end if;
   increment chatter count by 1;
   otherwise;
   choose a random row in the Table of Tabletime-Cheerio-Reaching;
   say "[chatter entry][paragraph break]";
   blank out the whole row;
   end if.
Table of Tabletime-Parent-Chatter
Chatter
"Becca says, 'Farina, I know you're not feeding that child chopped-up people food.'"
"'It's no different than canned baby food,' the mom tells Becca."
"'Really?' Lisa says. 'I'd be worried that I'd give Cassie something that'd hurt her.'"
"'Kids can eat nearly anything you can if it's pureed,' says Marion."
"'Weird,' Becca says. 'Then why buy special baby food at all?'"
"'Well,' says Parry, 'Sometimes it's really convenient to have a jar for Mason[note mason-jar] so--whoops!' And then you stop paying attention to him because he spilled a teeny bowl of Cheerios and you and all the other babies are all staring at the spray of Cheerios."
Table of Tabletime-Baby-Chatter
Chatter
"Jemison is taking bits of food and dropping them over his high chair and then watching them hit the floor."
"Cassie is trying to climb out of her chair so she can fall to the floor and Lisa is restraining her."
"Watson is spitting up and Parry is looking sad that he's going to have to change Watson's clothes."
"Zoe is demanding more food. Grr, Zoe."
"the mom is saying, 'Here! Take a bite!'"
Table of Tabletime-Cheerio-Reaching
Chatter
"Jemison reaches for the Cheerios but they are way too far away."
"Cassie rocks hard in her seat, maybe she thinks she can tip over to get to the Cheerios."
"Watson looks at the Cheerios all sadly."

The source code to Child's Play is licensed under a Creative Commons NonCommercial Sampling Plus 1.0 License.