The Amazing Interactive Turing MachineAn interactive fiction by J.D. Clemens (2006) - the Inform 7 source text | |
| Home page Contents Previous Next Complete text | Section 4 - Control Room
A button is a kind of thing. The Control Room is a room. "[if unvisited]This is the control room of the Amazing Interactive Turing Machine. [end if]A trapdoor in the floor leads into the bowels of the machine. [if unvisited]A small grimy window looks out onto a tattered paper tape, and a set of instructions are tacked onto wall. The exit is to the west[otherwise]The window looks out onto the tape[end if]. A cluttered control panel leans against the wall." Instead of exiting when the player is in the control room, try going west instead. Instead of going west in the control room when the machine is not used, say "Why not have some fun before leaving?" Instead of going west in the control room when the floor is dirty, say "You need to clean the floor here before leaving." Instead of going west in the control room: say "The odd contraption has worn you out, and it is time to go home."; end the game saying "You have left the Amazing Interactive Turing Machine". The set of instructions are scenery in the control room. Instead of examining the instructions: say "[bold type]Instructions for using the Amazing Interactive Turing Machine[roman type][paragraph break]Running the machine:[line break]- To start: Press the green button. [line break]- To pause, or run a single step: Press the yellow button. [line break]- To reset the machine: Press the red button. [line break]- To clear all state information: Press the tiny recessed button. [line break]('run', 'step', 'reset', and 'clear' also work) [line break][paragraph break]Using the state controller:[line break]- To select a state for editing: Set the selected state dial to the desired number. [line break]- To erase the selected state: Press the erase button. [line break]- To change a state transition (E, Z, or O): set the corresponding dial to the desired number. [line break]- To change a machine action (Z or O): set the corresponding dial to the desired action.[paragraph break]To set the tape: 'set tape to 1 1 0 1' will set the tape to *1101 (note that only the digits 0 and 1 may be used, and they must be separated by spaces).[paragraph break]"; say "How the machine works:[line break]The left edge of the tape is marked with a *; all other cells can contain either 0 or 1 (a blank cell is treated as 0). The machine has a read/write head, which initially starts in state 1 at the first cell to the right of *. Our machine head has been fitted with a red window to highlight the cell being read (apologies to colorblind users). To perform one step, the machine consults the state table for the current symbol (*, 0, or 1, denoted E, Z, or O on the controls). It changes to the corresponding state entry and performs the corresponding action. The possible actions are: move left, move right, write zero, write one, and halt. When reading *, the only possible action is to move right. The machine runs until it reaches a halt instruction, or enters a state without a state entry.[paragraph break]Due to funding restrictions, our machine currently has only [number of rows in the Table of State Transitions] states and a tape length of [number of rows in the Table of Tape Values].[paragraph break]At the bottom, someone has scrawled 'Yes! We finally have the unary adder working!'[line break]". Instead of taking the instructions, say "The tack is surprisingly difficult to remove." The window is scenery in the control room. Instead of searching or examining the window, try examining the tape. The trapdoor is a scenery door. It is below the Control Room and above the Bowels of the Machine. Understand "trap" or "door" as the trapdoor. Before going down from the control room when the machine is active, say "It doesn't seem wise to climb down there while the machine is running." instead. Before going down from the control room, say "You lower yourself into the machine..." Before going up from the bowels, say "You pull yourself back up." |