mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-23 00:42:13 -07:00
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:
23
puzzles.but
23
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.
|
||||
|
Reference in New Issue
Block a user