Fixes in 1994/westley
Format fixes in README.md. Added note from author about terminal configuration from Brian at the top of the README.md and the Makefile so that it's easier to see. Using the spoiler section from Brian I converted it to compiler commands (in the README.md) and made a spoiler.sh script to run them - to make it easier to see the game in full for those who just want to see it and not try it.
This commit is contained in:
1 parent
d739f393ca
commit
834a24867a
3 files changed
+79
-29
No files matched your search
@@ -129,6 +129,7 @@ all: data ${TARGET}
|
|||||||
${PROG}: ${PROG}.c
|
${PROG}: ${PROG}.c
|
||||||
@echo "NOTE: this entry has different compiler errors based on compilation line."
|
@echo "NOTE: this entry has different compiler errors based on compilation line."
|
||||||
@echo "The purpose is to find the right error message to win the game!"
|
@echo "The purpose is to find the right error message to win the game!"
|
||||||
|
@echo "NOTE: your terminal should be set to 80 columns, 8 character tabs, and wraparound."
|
||||||
-${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
-${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
# alternative executable
|
# alternative executable
|
||||||
|
|||||||
+59
-29
@@ -5,53 +5,76 @@
|
|||||||
1906 James Ave.
|
1906 James Ave.
|
||||||
St. Paul, MN 55105
|
St. Paul, MN 55105
|
||||||
USA
|
USA
|
||||||
|
<http://www.westley.org>
|
||||||
http://www.westley.org
|
|
||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
|
|
||||||
|
```sh
|
||||||
make all
|
make all
|
||||||
|
```
|
||||||
|
|
||||||
NOTE: the purpose of this entry is to escape the dungeon via the compiler line
|
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
|
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
|
will get different error messages and one compiler line will make you win the
|
||||||
game!
|
game!
|
||||||
|
|
||||||
## To run
|
## To run:
|
||||||
|
|
||||||
|
```sh
|
||||||
./westley
|
./westley
|
||||||
|
```
|
||||||
|
|
||||||
## Judges' comments
|
NOTE: your terminal should be set to 80 columns, 8 character tabs, and
|
||||||
|
wraparound.
|
||||||
|
|
||||||
|
|
||||||
|
## Try:
|
||||||
|
|
||||||
But for something more interesting try compiling it with
|
But for something more interesting try compiling it with
|
||||||
different cc arguments. For example:
|
different cc arguments. For example:
|
||||||
|
|
||||||
|
```sh
|
||||||
cc -Describe -Door westley.c
|
cc -Describe -Door westley.c
|
||||||
cc -Describe -Drain westley.c
|
cc -Describe -Drain westley.c
|
||||||
|
```
|
||||||
|
|
||||||
|
## Judges' comments:
|
||||||
|
|
||||||
Not all compiler errors are bad.
|
Not all compiler errors are bad.
|
||||||
|
|
||||||
For spoilers see the end of the notes from the author below.
|
For spoilers see the end of the notes from the author below.
|
||||||
|
|
||||||
## Author's comments
|
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) converted the spoiler
|
||||||
|
compiler options to be compiler commands and added a script
|
||||||
|
[spoiler.sh](spoiler.sh) to automate the spoiler commands provided by the author
|
||||||
|
to make it easier to see the game in action. Thank you Cody! To use:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./spoiler.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Author's comments:
|
||||||
|
|
||||||
This program, in accordance with the rules, compiles into a legal
|
This program, in accordance with the rules, compiles into a legal
|
||||||
C program without human intervention. However, it simply compiles
|
C program without human intervention. However, it simply compiles
|
||||||
into "main(){}", which does nothing and exits, so you don't need
|
into `main(){}`, which does nothing and exits, so you don't need
|
||||||
to actually compile the program.
|
to actually compile the program.
|
||||||
|
|
||||||
This program is a simple adventure game which uses only C preprocessor
|
This program is a simple adventure game which uses only C preprocessor
|
||||||
error messages (for missing #include files) as output. To begin,
|
error messages (for missing `#include` files) as output. To begin,
|
||||||
try to compile the program with no options:
|
try to compile the program with no options:
|
||||||
|
|
||||||
|
```sh
|
||||||
cc westley.c
|
cc westley.c
|
||||||
|
```
|
||||||
|
|
||||||
This will fail, producing an error message for a missing #include
|
This will fail, producing an error message for a missing `#include`
|
||||||
file as the opening description. Your terminal should be set for
|
file as the opening description. Your terminal should be set for
|
||||||
80 columns, 8 character tabs, and wraparound, as there is no way
|
80 columns, 8 character tabs, and wraparound, as there is no way
|
||||||
to reliably output newlines. You should see something like this
|
to reliably output newlines. You should see something like this
|
||||||
(text massaged to change wraparound to separate lines):
|
(text massaged to change wraparound to separate lines):
|
||||||
|
|
||||||
|
```
|
||||||
westley.c
|
westley.c
|
||||||
westley.c(87) : fatal error C1024: cannot open include file '
|
westley.c(87) : fatal error C1024: cannot open include file '
|
||||||
|
|
||||||
@@ -61,13 +84,17 @@ For spoilers see the end of the notes from the author below.
|
|||||||
a floor drain
|
a floor drain
|
||||||
|
|
||||||
'
|
'
|
||||||
|
```
|
||||||
|
|
||||||
Your compiler error message will vary, but the important part is the
|
Your compiler error message will vary, but the important part is the
|
||||||
missing include file name, which functions as the game text.
|
missing include file name, which functions as the game text.
|
||||||
|
|
||||||
To "do" things, all words must start with "-D". For example, to
|
To "do" things, all words must start with `-D`. For example, to
|
||||||
look at the door, do:
|
look at the door, do:
|
||||||
|
|
||||||
|
```sh
|
||||||
cc -Describe -Door prog.c
|
cc -Describe -Door prog.c
|
||||||
|
```
|
||||||
|
|
||||||
...and you will get another error message telling you about the door.
|
...and you will get another error message telling you about the door.
|
||||||
(note: some compilers will stop after the first missing include file,
|
(note: some compilers will stop after the first missing include file,
|
||||||
@@ -78,26 +105,29 @@ For spoilers see the end of the notes from the author below.
|
|||||||
The goal of the game is to escape the dungeon.
|
The goal of the game is to escape the dungeon.
|
||||||
|
|
||||||
Here is a walk-through for the game, including a few dead-ends:
|
Here is a walk-through for the game, including a few dead-ends:
|
||||||
---SPOILER---
|
|
||||||
|
### SPOILER
|
||||||
-Describe -Door
|
|
||||||
-Describe -Drain
|
```sh
|
||||||
-Describe -Dwarf
|
cc -Describe -Door westley.c
|
||||||
-Describe -Debris (or -Dungeon)
|
cc -Describe -Drain westley.c
|
||||||
-Describe -Desk
|
cc -Describe -Dwarf westley.c
|
||||||
-Describe -Dime
|
cc -Describe -Debris westley.c # or -Dungeon
|
||||||
-Describe -Directory
|
cc -Describe -Desk westley.c
|
||||||
-Dial -DUNgeon0614
|
cc -Describe -Dime westley.c
|
||||||
-Drink -Daiquiri
|
cc -Describe -Directory westley.c
|
||||||
-Drop -Daiquiri
|
cc -Dial -DUNgeon0614 westley.c
|
||||||
-Drop -Dwarf -Daiquiri (or -Drop -Down -Daiquiri)
|
cc -Drink -Daiquiri westley.c
|
||||||
-Describe -Document
|
cc -Drop -Daiquiri westley.c
|
||||||
-Depress -Dotted -Dog
|
cc -Drop -Dwarf -Daiquiri westley.c # or -Drop -Down -Daiquiri
|
||||||
-Depress -Dalmatian (also accepts "Dalmation" [sic])
|
cc -Describe -Document westley.c
|
||||||
-Deposit -Dime
|
cc -Depress -Dotted -Dog westley.c
|
||||||
-Drop -Donut
|
cc -Depress -Dalmatian westley.c # also accepts "Dalmation" [sic]
|
||||||
-Drop -Donut -Down -Drain (or -Drop -Dwarf -Donut)
|
cc -Deposit -Dime westley.c
|
||||||
(at this point, you win!)
|
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
|
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
|
commands in any order, at any time. Also note that word order is
|
||||||
|
|||||||
Executable
+19
@@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
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
|
||||||
Reference in new issue
Block a user