Files
ioccc/1994/westley
Landon Curt Noll d414b6d71f add quick-readme2index.sh, improve all-run.sh and readme2index.sh
Improved `all-run.sh` and `readme2index.sh` so that
certain command line options (e.g., -p, -P, -u, -U ...)
are only passed along to other tools if they are
given on the command line.

all-run.sh VERSION changed from "1.1.1 2024-01-19"
to "1.1.2 2024-01-20",

readme2index.sh VERSION changed from "1.1 2024-01-16"
to "1.1.1 2024-01-20".

Added `quick-readme2index.sh` that only calls
`readme2index.sh` if the `index.html` is not
a non-empty file, or of either `.winner.json`
and/or `README.md` is newer than `index.html`.

Updated all `index.html` files because the
the file contains a comment that includes
the newly modified readme2index.sh VERSION.
2024-01-21 00:21:40 -08:00
..
2024-01-11 06:24:11 -08:00
2024-01-15 04:29:39 -08:00
2024-01-11 08:05:10 -08:00
2022-09-18 23:37:49 -07:00
2023-07-06 21:49:38 -07:00

To build:

make all

NOTE: the purpose of this entry is to escape the dungeon via the compiler line where you get messages as compiler errors. Depending on the compiler line you will get different error messages and one compiler line will make you win the game!

NOTE: your terminal should be set to 80 columns, 8 character tabs, and wraparound.

To use:

There is no running as such. See below.

Try:

But for something more interesting try compiling it with different cc arguments. For example:

cc -Describe -Door westley.c
cc -Describe -Drain westley.c

Judges' remarks:

Not all compiler errors are bad.

For spoilers see the end of the notes from the author below.

To use:

./try.sh

Author's remarks:

This program, in accordance with the rules, compiles into a legal C program without human intervention. However, it simply compiles into main(){}, which does nothing and exits, so you don't need to actually compile the program.

This program is a simple adventure game which uses only C preprocessor error messages (for missing #include files) as output. To begin, try to compile the program with no options:

cc westley.c

This will fail, producing an error message for a missing #include file as the opening description. Your terminal should be set for 80 columns, 8 character tabs, and wraparound, as there is no way to reliably output newlines. You should see something like this (text massaged to change wraparound to separate lines):

    westley.c
    westley.c(87) : fatal error C1024: cannot open include file '

     You are in a debris-filled
      dungeon; a door bars the
      way, and sludge trickles into
      a floor drain

     '

Your compiler error message will vary, but the important part is the missing include file name, which functions as the game text.

To "do" things, all words must start with -D. For example, to look at the door, do:

cc -Describe -Door prog.c

...and you will get another error message telling you about the door. (note: some compilers will stop after the first missing include file, while others will continue to try compiling; the latter will repeat the opening message each time, as if you are playing an adventure game with "verbose" turned on).

The goal of the game is to escape the dungeon.

Here is a walk-through for the game, including a few dead-ends:

SPOILER

cc -Describe -Door westley.c
cc -Describe -Drain westley.c
cc -Describe -Dwarf westley.c
cc -Describe -Debris westley.c # or -Dungeon
cc -Describe -Desk westley.c
cc -Describe -Dime westley.c
cc -Describe -Directory westley.c
cc -Dial -DUNgeon0614 westley.c
cc -Drink -Daiquiri westley.c
cc -Drop -Daiquiri westley.c
cc -Drop -Dwarf -Daiquiri westley.c # or -Drop -Down -Daiquiri
cc -Describe -Document westley.c
cc -Depress -Dotted -Dog westley.c
cc -Depress -Dalmatian westley.c # also accepts "Dalmation" [sic]
cc -Deposit -Dime westley.c
cc -Drop -Donut westley.c
cc -Drop -Donut -Down -Drain westley.c # or -Drop -Dwarf -Donut
# (at this point, you win!)

Note that the game has no real state information; you can type these commands in any order, at any time. Also note that word order is unimportant.

This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. You are free to share and adapt this file under the terms of this license:

Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)

For more information, see: https://creativecommons.org/licenses/by-sa/4.0/