"Z-TEST" by Zack Urlocker [ Test game to illustrate the Clues command Clues command tells player how many undiscovered items are in the current room. Also adds a * next to location name in the status bar if there are remaining items to be found. ] Section - Global variables Last status location is text that varies. [ used to track status line * ] When play begins: now Last status location is "[the player's surroundings] *". Section - Discoveries [ Use the Clues command to find out how many items remain.] [ Status line displays a * if there are undiscovered items. ] A thing can be found or hidden. A thing is usually hidden. Carry out examining something (called the item): now the item is found; if item is listed in discoveries of location: remove item from discoveries of location. [ Taking something also makes it found ] Carry out taking something (called the item): now the item is found; if item is listed in discoveries of location: remove item from discoveries of location. [ Each room has its own potential discoveries. ] A room has a list of things called discoveries. [ Set up interesting clues for each room ] When play begins: now the left hand status line is "Hotel Room *"; now discoveries of Hotel Room is {gun, bible, postcard}; now discoveries of Hotel Bathroom is {matchbook}. [ Check the status line after every turn. Show a * if there are undiscovered items. Avoid flicker if nothing has changed. ] Every turn: if discoveries of location is empty: if last status location is not "[the player's surroundings] ": now the left hand status line is "[the player's surroundings] "; else: if last status location is not "[the player's surroundings] *": now the left hand status line is "[the player's surroundings] *". Section - Clues command Understand "clues" or "clue" as asking for clues. Asking for clues is an action out of world. Carry out asking for clues: [ Status line is also updated to * separately as necessary on Every Turn ] let L be discoveries of location; let N be the number of entries in L; if L is empty: say "[italic type]You've found all the hidden items in the [location][roman type]."; else: if N is 1: say "[italic type]There is 1 item left to find in the [location][roman type]."; else: say "[italic type]There are [N] items left to find in the [location][roman type]."; Section - Hotel Room The player is in the Hotel Room. Hotel Room is a room. "You're at the San Moreno Inn, room 108. You've got a desk, a dresser, a nightstand. You've stayed in plenty of worse dives. The bathroom is to the east." The hotel desk is an undescribed fixed in place enterable supporter in Hotel Room. The side drawer is a closed openable container and part of the hotel desk. On the hotel desk is a gun. The hotel desk has description "Like you, the hotel desk is as worn with cigarette burns and coffee stains. There's a small side drawer that doesn't seem to shut." The postcard is in the side drawer. The postcard has description "It's a faded postcard with a picture of the San Moreno Mission from the 1930s." A nightstand is a undescribed fixed in place supporter in Hotel Room. The nightstand has description "It's an old wooden nightstand, standing slightly crooked, with a small drawer that doesn't quite shut properly." On the nightstand is a clock radio. The small drawer is a closed openable container and part of the nightstand. The bible is in the small drawer. The bible has description "It's an old Gideon Bible. You flip through the pages but find no inspiration". Gun is a thing. It has description "It's your trusty .32 caliber Smith & Wesson." The bed is an undescribed fixed in place enterable supporter in Hotel Room. The bed has description "The bed is rumpled and sags slightly in the middle. No wonder the hotel was a good deal. But considering your current budget, that's just fine." [ Need to be able to open dresser. Not that there's anything interesting here. ] The dresser is an undescribed fixed in place enterable supporter in Hotel Room. DresserDrawer is a closed openable container and part of dresser. Understand "dresser drawer" as DresserDrawer. DresserDrawer has printed name "dresser drawer". The dresser has description "It's a dilapidated wooden dresser that fits perfectly with the dank atmosphere of the hotel." After opening DresserDrawer: [if DresserDrawer is empty, ]say "It's empty." Section - Hotel Bathroom Hotel Bathroom is east of Hotel Room. "The bathroom is lit by a single bare lightbulb that casts harsh shadows across the porcelain and tile. The hotel room is to the west." A counter is fixed in place enterable supporter in the hotel bathroom. On the counter is a sink, a matchbook and a bottle of aspirin. Some aspirin has description "The little bottle of aspirin is almost empty." The matchbook has description "The matchbook is from The Brass Lantern in Cabeza Plana, ADeline 1308."