Actor's Studio
Example 221
★★Here we construct a video camera to track and play back actions:
"The Actor's Studio"
Section 1 - The Video Camera
The video camera is a thing carried by the player.
Table of Videotape
recorded action | time stamp |
waiting | 9:00 AM |
with 25 blank rows.
Mode is a kind of value. The modes are idle, recording, and playing back. The video camera has a mode. The video camera is idle.
Understand "play back" as playing back. Instead of switching on the camera, try tuning the camera to recording. Instead of switching off the camera, try tuning the camera to idle.
The description of the video camera is "It is currently [mode]; its available settings are idle, recording, and playing back."
Understand "set [camera] to [a mode]" as tuning it to. Tuning it to is an action applying to one thing and one mode.
Instead of setting the camera to something:
say "The available settings are idle, recording, and playing back."
Check tuning it to:
if the noun is not the camera, say "Only the video camera can be set to [the mode understood]." instead.
Carry out tuning it to:
now the mode of the noun is the mode understood.
Report tuning it to:
say "You set [the noun] to [mode understood]."
After an actor doing something when the video camera is recording:
if the current action is tuning the video camera to recording, make no decision;
if the number of blank rows in the Table of Videotape is greater than zero:
choose a blank row in the Table of Videotape;
now the recorded action entry is the current action;
now the time stamp entry is the time of day;
otherwise:
now the video camera is idle;
say "The video camera runs out of recording memory and switches off.";
continue the action.
Every turn when the video camera is playing back:
say "On the camera screen, you see [run paragraph on]";
let starting playback be false;
repeat through the Table of Videotape:
if the recorded action entry is not waiting:
now starting playback is true;
say "[line break] -- [if the actor part of the recorded action entry is the player]you [end if][the recorded action entry], time stamped at [time stamp entry]";
blank out the whole row;
if starting playback is false, say "only static.";
otherwise say paragraph break.
Section 2 - The Scenario
The Actor's Studio is a room. Lucas is a man in the Actor's Studio. Persuasion rule: persuasion succeeds.
The Studio contains an edible thing called a croissant.
Test me with "set camera to recording / x lucas / lucas, take inventory / lucas, eat croissant / set camera to playing back / z".
Test me with "set camera to recording / x lucas / lucas, take inventory / lucas, eat croissant / set camera to playing back / z".
Actor's Studio
You can see Lucas and a croissant here.
>(Testing.)
>[1] set camera to recording
You set the video camera to recording.
>[2] x lucas
You see nothing special about Lucas.
>[3] lucas, take inventory
Lucas looks through his possessions.
>[4] lucas, eat croissant
(Lucas first taking the croissant)
Lucas eats the croissant.
>[5] set camera to playing back
You set the video camera to playing back.
On the camera screen, you see
-- you examining Lucas, time stamped at 9:01 am
-- Lucas taking inventory, time stamped at 9:02 am
-- Lucas taking the croissant, time stamped at 9:03 am
-- Lucas eating the croissant, time stamped at 9:03 am
>[6] z
Time passes.
On the camera screen, you see only static.
You can see Lucas and a croissant here.
>(Testing.)
>[1] set camera to recording
You set the video camera to recording.
>[2] x lucas
You see nothing special about Lucas.
>[3] lucas, take inventory
Lucas looks through his possessions.
>[4] lucas, eat croissant
(Lucas first taking the croissant)
Lucas eats the croissant.
>[5] set camera to playing back
You set the video camera to playing back.
On the camera screen, you see
-- you examining Lucas, time stamped at 9:01 am
-- Lucas taking inventory, time stamped at 9:02 am
-- Lucas taking the croissant, time stamped at 9:03 am
-- Lucas eating the croissant, time stamped at 9:03 am
>[6] z
Time passes.
On the camera screen, you see only static.
Notice that both Lucas' implied taking action (picking up the croissant) and his eating action are recorded on the same move.