From 6aa7ccfa067e5711b9b3d5c9d83d69c5565fdc0e Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 29 Nov 2008 08:50:50 +0000 Subject: 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] --- puzzles.but | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'puzzles.but') 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. -- cgit v1.1