Make "writing-puzzles" up to date

This commit is contained in:
Neale Pickett 2017-10-03 15:32:37 -06:00
parent 486349ca19
commit 20d1daf157
1 changed files with 3 additions and 73 deletions

View File

@ -88,76 +88,6 @@ value puzzle. In the "sandwich" category we have only 5, 10, and
Step 4: Write puzzles
---------------------
Now that your skeleton is set up, you can begin to fill it in. In each
point-value subdirectory, there can be three special files, and as many
downloadable files as you like, in addition to CGI and any downloadable
but non-listed files you would like.
Special files are:
* index.mdwn: a plain text file formatted with
[markdown](http://daringfireball.net/projects/markdown/), displayed
before the list of normal files in the puzzle directory.
* key: a plain text file with acceptable answers, one per line. Answers
are matched exactly (ie. they are case-sensitive).
* summary: a single line explaining to contest organizers what's going
on in this puzzle.
All remaining files, except those with filenames beginning with a comma
(","), are listed on the puzzle page for download.
Any file ending with ".cgi" will be run as CGI. You can search the web
for how to write a CGI. Available languages are Python, Lua, and Bourne
Shell.
Let's make our 5-point sandwich question!
$ cd 5
$ cat <<EOD >index.mdwn
> Welcome to the Sandwich category!
> In this category you will learn how to make a tasty sandwich.
> The key ingredients in a sandwich are: bread, spread, and filling.
> When making a sandwich, you need to first put down one slice of bread,
> then apply any spreads, and finally add filling. Popular fillings
> include cheese, sprouts, and cold cuts. When you are done, apply
> another slice of bread on top, and optionally tie it together with
> a fancy toothpick.
>
> Now that you know the basics of sandwich-making, it's time for a
> question! How many slices of bread are in a sandwich?
> EOD
$ cat <<EOD >key
> 2
> TWO
> two
> EOD
$ echo "How many slices of bread in a sandwich" > summary
$
If you wanted to provide a PDF of various sandwiches, this would be the
time to add that too:
$ cp /tmp/sandwich-types.pdf .
$
In a real category, you might provide an executable, hard drive image,
or some other kind of blob.
No additional work is needed to have `sandwich-types.pdf` show up as a
download on the puzzle page.
Step 5: Package it up
---------------------
After you've flushed out all your point-value directories, it's time to
wrap it up and send it in. Clean out any backup or temporary files you
or your editor might have written in the directories, and zip the sucker
up.
$ cd ../..
$ zip -r sandwich.zip sandwich/
$
Now mail the zip file in, and you're all done!
Now that your skeleton is set up, you can begin to fill it in.
Check the `example-puzzles` directory for examples of how to format puzzles,
and how to use the Python Puzzle object for dynamically-generated puzzles.