An interactive fiction by David A. Wheeler (2007) - the Inform 7 source text
|Chapter 4 - Gameplay
When play begins:
Change solution time to 0;
Change the warning about giving up to 0;
Change the right hand status line to "Time: Unstarted";
Change murderer to a random suspect;
Change murder location to a random room;
Change murder weapon to a random weapon;
repeat with this suspect running through suspects begin;
move this suspect to a random room;
repeat with this weapon running through weapons begin;
move this weapon to a random room;
say "Welcome, detective! We really need your help in finding out who committed this terrible murder, where, and with what (the gun, knife, or poison). I understand that you can accuse someone and determine if something is true about the accusation; that is a skill you'll need here! But you'll need to hurry; we must find out who murdered Mr. David A. Wheeler right away.
[italic type]Type 'help' for more.[roman type]".
Increase solution time by 1;
if solution time > 0 then change the right hand status line to "Time: [solution time] minute[if solution time > 1]s[end if]".
After reading a command:
if the player's command includes "please" begin;
say "(That's very polite! But no need to say please.)";
cut the matched text;
Rule for deciding whether all includes scenery: it does not.
Instead of going nowhere for the third time: say "There's no need to bump into walls, I'll tell you if there's an exit in a certain direction."
Taking inventory is acting confused. Looking is acting confused.
After acting confused for the sixth turn:
say "Are you having trouble? Type 'help' to get more information."