.TH FREESWEEP 6 "Version 0.86" "Gus Hartmann & Pete Keller"

.SH NAME
freesweep \- a curses minesweeper-style game

.SH SYNOPSIS
.TP 6
\fBfreesweep\fP
[\fB\-%\fP\ \fIvalue\fP]
[\fB\-a\fP]
[\fB\-f\fP\ |\ \fB\-i\fP]
[\fB\-h\fP\ \fIvalue\fP]
[\fB\-m\fP\ \fIvalue\fP]
[\fB\-s\fP]
[\fB\-w\fP\ \fIvalue\fP]
[\fB\-\-alt\-charset\fP]
[\fB\-\-fast\fP]
[\fB\-\-height=\fP\fIvalue\fP]
[\fB\-\-interactive\fP\ |\ \fB\-\-save\-prefs\fP]
[\fB\-\-mines=\fP\fIvalue\fP]
[\fB\-\-percent=\fP\fIvalue\fP]
[\fB\-\-width=\fP\fIvalue\fP]
.TP 6
\fBfreesweep\fP
[\fB\-a\fP]
[\fB\-b\fP\ |\ \fB\-d\fP]
[\fB\-\-alt\-charset\fP]
[\fB\-\-dump\-best\-times\fP\ |\ \fB\-\-show\-best\-times\fP]
.TP 6
\fBfreesweep\fP
[\fB\-a\fP]
[\fB\-g\fP]
[\fB\-\-show\-gpl\fP]
.TP 6
\fBfreesweep\fP
[\fB\-v\fP]
[\fB\-\-version\fP]
.TP 6
\fBfreesweep\fP
[\fB\-H\fP]
[\fB\-\-help\fP]

.SH DESCRIPTION
\fBfreesweep\fP is a curses-based minesweeper game for *nix.

.SH OPTIONS

.TP
\fB\-%\fP\ \fIvalue\fP, \fB\-\-percent=\fP\fIvalue\fP
Sets the number of mines to \fIvalue\fP percent of the number of squares on
the board, rounded to the nearest integer. This option cannot be used with
the \-m or \-\-mines options.
.TP
\fB\-a\fP, \fB\-\-alt\-charset\fP
Switch character sets between standard ASCII and PC-style linedraw characters.
Use of this option on the command line indicates that the character set should
be the set \fInot\fP specified in the preferences file. See the FILES section
below.

The character set can also be toggled during play using the 'a' key, which
can be useful when a terminal fails to have the PC-style linedraw character
set. See the COMMANDS section below.
.TP
\fB\-b\fP, \fB\-\-show\-best\-times\fP
Use the curses best times viewer rather than starting a game, then exit.

The best times viewer can also be accessed during play by selecting the 'b'
key. See the COMMANDS section below.
.TP
\fB\-d\fP, \fB\-\-dump\-best\-times\fP
Print the list of best times, sorted in descending order to stdout. More
information will be placed in this manual page regarding the column format
when it has been clearly established.
.TP
\fB\-f\fP, \fB\-\-fast\fP
This option bypasses the intercative dialog normally run initially. All values
must either be specified on the command line or in the preferences files.
.TP
\fB\-g\fP, \fB\-\-show\-gpl\fP
Display the GNU General Public License, in a nice curses page viewer. Currently
version 2 of the license is displayed; however, freesweep is licensed under
version 2 or later of the GNU GPL, so this license may be superceded in the
future.
.TP
\fB\-H\fP, \fB\-\-help\fP
Print the lost of valid command line options, then exit.
.TP
\fB\-h\fP\ \fIvalue\fP, \fB\-\-height=\fP\fIvalue\fP
Set height to \fIvalue\fP. If the interactive dialog is run initially, any
value passed for height will be listed as the default.
.TP
\fB\-i\fP, \fB\-\-interactive\fP
Force the interactive menu to be run initially. This is primarily used to
override the FastStart option specified in the preferences file. It cannot
be used with the \fB\-f\-fP or \fB\-\-fast\fP options.
.TP
\fB\-m\fP\ \fIvalue\fP, \fB\-\-mines=\fP\fIvalue\fP
Set the number of mines to \fIvalue\fP. This option cannot be used with
the \-% or \-\-percent options.
.TP
\fB\-s\fP, \fB\-\-save\-prefs\fP
Save any preferences passed on the command line. This option is normally used
with the FastStart option (specified with \fB\-f\fP or \fB\-\-fast\fP)
.TP
\fB\-v\fP, \fB\-\-version\fP
Display version information and exit. Use of this option overrides all other
options.
.TP
\fB\-w\fP\ \fIvalue\fP, \fB\-\-width=\fP\fIvalue\fP
Set width to \fIvalue\fP. If the interactive dialog is run initially, any
value passed for width will be listed as the default.



.SH COMMANDS
When started normally, freesweep will conduct a dialog to query the following
information from the player: height and width of the board, number of mines
(as either an integer or in terms of size of the board), if PC-style line
drawing characters are to be used, if future games should use FastStart mode,
how to announce alerts (beep, visual bell, or none), and if the newly
entered preferences should be saved. This dialog is skipped if the \-f or
\-\-fast flags are passed, or if the FastStart option is selected in the
preference file.

In normal play, freesweep waits for keystrokes, and then reacts according
to the recieved value. Some keystrokes may be modified by a preceding
integer; these are noted in the list below by a preceding \fIn\fP. The
following keystroke values are valid:

.TP
\fIn\fP\<arrow key\>, \fIn\fPh, \fIn\fPj, \fIn\fPk, \fIn\fPl
The arrow keys move the cursor \fIn\fP squares in the corresponding direction,
as limited by the boundaries of the playing field. A warning is issued should
this occur. The default integer is one.

The vi-style motion keys h, j, k, and l are also accepted, and are equivalent
to the arrow keys.

.TP
a
Toggle between the standard ASCII character set and PC-style linedraw.
.TP
b
Display the best times list, one screenful at a time. The game clock is
suspended for the duration of the best times viewer.
.TP
g
Display the GNU General Public License, version 2. The game clock is suspended
for the duration of the viewing of the GNU GPL. The text is displayed one
screenful at a time; 'q' returns to game play, any other key advances to the
next screenful.
.TP
?
Display a help screen, containing a listing of valid commands. The game clock
is suspended for the duration of the viewing of this screen.
.TP
f
Toggle flagging the current square as a mine. Flagged squares cannot be exposed.
.TP
<space>

.SH FILES
.TP 10
.I ~/.sweeprc
The user's sweep resource file.
.TP 10
.I ~/.sweeptimes
The user's sweep best times file.
.TP 10
\fI@PREFSDIR@/sweeprc\fP
The global default sweep resource file.
.TP 10
\fI@SCORESDIR@/sweeptimes\fP
The shared best times file.

The global preference file is read first, then the player's preference file.
Any command line options are considered next, and lastly any input from the
interactive dialog.

.SH AUTHORS
Gus Hartmann <hartmann@upl.cs.wisc.edu>
.br
Pete Keller <psilord@upl.cs.wisc.edu>
.br

.SH CREDITS
This program would not have been written had there been more machines capable
of running X Windows in the lab where I learned to program, the
.I Undergraduate Project Lab
at the
\fIUniversity of Wisconsin Department of Computer Sciences\fP

.SH BUGS
The best times code is currently only partially implemented.

The viewer for the GNU GPL and the best times cannot go backwards.

This manual page always includes the GNU-style long options, even on systems
which do not support them.

Other bugs should be reported to <sweep@cs.wisc.edu>.
