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]
This commit is contained in:
Simon Tatham
2008-11-29 08:50:50 +00:00
parent 4443016a82
commit 6aa7ccfa06
2 changed files with 78 additions and 4 deletions

View File

@ -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.