aboutsummaryrefslogtreecommitdiff
path: root/puzzles.but
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2008-11-29 08:50:50 +0000
committerSimon Tatham <anakin@pobox.com>2008-11-29 08:50:50 +0000
commit6aa7ccfa067e5711b9b3d5c9d83d69c5565fdc0e (patch)
tree51bfc32547a171a5c7136b083c2c7bd041106ac4 /puzzles.but
parent4443016a825e6ba089781b43de14aaa8034f1cc2 (diff)
downloadpuzzles-6aa7ccfa067e5711b9b3d5c9d83d69c5565fdc0e.zip
puzzles-6aa7ccfa067e5711b9b3d5c9d83d69c5565fdc0e.tar.gz
puzzles-6aa7ccfa067e5711b9b3d5c9d83d69c5565fdc0e.tar.bz2
puzzles-6aa7ccfa067e5711b9b3d5c9d83d69c5565fdc0e.tar.xz
The other day I found it useful for a (silly) special purpose to
generate a thousand saved-game files of randomly generated puzzles. On the general principle that if I find it useful someone else conceivably might too, add a --save option to the Unix puzzle binaries, for use with --generate in much the same way as --print. [originally from svn r8351]
Diffstat (limited to 'puzzles.but')
-rw-r--r--puzzles.but23
1 files changed, 23 insertions, 0 deletions
diff --git a/puzzles.but b/puzzles.but
index 89f2267..7f7f9d6 100644
--- a/puzzles.but
+++ b/puzzles.but
@@ -368,6 +368,29 @@ There are various other options which affect printing; see below.
}
+\dt \cw{--save }\e{file-prefix} [ \cw{--save-suffix }\e{file-suffix} ]
+
+\dd If this option is specified, instead of a puzzle being
+displayed, saved-game files for one or more unsolved puzzles are
+written to files constructed from the supplied prefix and/or suffix.
+
+\lcont{
+
+If \c{--generate} has also been specified, the invented game IDs will
+be used to generate the printed output. Otherwise, a list of game IDs
+is expected on standard input (which can be descriptive or random
+seeds; see \k{common-id}), in the same format produced by
+\c{--generate}.
+
+For example:
+
+\c net --generate 12 --save game --save-suffix .sav
+
+will generate twelve Net saved-game files with the names
+\cw{game0.sav} to \cw{game11.sav}.
+
+}
+
\dt \cw{--version}
\dd Prints version information about the game, and then quits.