The Amazing Interactive Turing Machine

An interactive fiction by J.D. Clemens (2006) - the Inform 7 source text

Home page

Contents
Previous
Next

Complete text
Section 6 - Bowels of the Machine

The Bowels of the Machine is a dark room. "[If unvisited]The insides of the Amazing Interactive Turing Machine are cramped and covered with grease. There is an orange button set into the wall. Above the button is stenciled 'Do not press the orange button'. [otherwise]Set into the wall is [a orange button]. [end if]Scrawled in chalk you see: 'State [current state]', and a tiny window shows a [current cell]. The trapdoor leads back up and various small holes are cut into the wall[holes][state actions]."

To say current cell:
    if head position is 0, say "*";
    otherwise say "[the Symbol in row head position of the Table of Tape Values]".

To say holes:
    if there is a StateN of the current state in the Table of State Transitions begin;
        let count be 0;
        choose row with a StateN of the current state in the Table of State Transitions;
        if the E State entry is not the current state begin;
            increase count by 1;
            say "; one of them is labeled '*: to [E State entry]'";
        end if;
        if the Z State entry is not the current state begin;
            if count is 0, say "; one of them";
            otherwise say ", another";
            say " is labeled '0: to [Z State entry]'";
            increase count by 1;
        end if;
        if the O State entry is not the current state begin;
            if count is 0, say "; one of them";
            if count is 1, say ", another";
            if count is 2, say ", a third";
            say " is labeled '1: to [O State entry]'";
        end if;
    end if.

To say state actions:
    if there is a StateN of the current state in the Table of State Transitions begin;
        choose row with a StateN of the current state in the Table of State Transitions;
        say ". On the ceiling you see etched: '0: [Z Action entry], 1: [O Action entry]'";
    end if.

The hole is scenery in the bowels. Understand "holes" as the hole. The description is "The holes are much to small to see through, let alone fit through."

Instead of doing anything other than examining the hole, try examining the hole.

The orange button is a scenery button in the bowels. The description is "Above the button is stenciled: 'Do not press the orange button.'".
The orange button is either used or unused. It is unused.

Rule for printing the name of the orange button when the orange button is unused: say "tempting orange button".

Before pushing the orange button for the first time, say "Predictable. Unfortunately, you have just blown up the machine. [paragraph break]Just kidding.[paragraph break]".

Instead of pushing the orange button, try inside stepping.
Instead of stepping when the player is in the bowels, try inside stepping.

Inside stepping is an action applying to nothing.

Before inside stepping: now the orange button is used.
    
Check inside stepping: if the machine is stopped, say "Nothing happens. Perhaps the machine has halted." instead.

Check inside stepping:
    if there is a StateN of the current state in the Table of State Transitions, continue the action;
    say "Nothing happens. Perhaps the machine has halted." instead.
    
Carry out inside stepping:
    carry out the single stepping activity.

Report inside stepping: say "You press the button and the machine shakes horribly. [if the current state is not the previous state]Your body is twisted horribly, and you find yourself in a new space labeled 'State [current state]'. [end if]The window now shows a [current cell]."