1321995a47a0eb9700fad04d2fc9272ed8b50075
[xscreensaver] / hacks / maze.man
1 .TH XScreenSaver 1 "7-mar-93" "X Version 11"
2 .SH NAME
3 maze \- an automated X11 demo repeatedly creating and solving a random maze
4 .SH SYNOPSIS
5 .B maze 
6 [\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP] [\-background \fIcolor\fP] [\-window] [\-root] [\-install] [\-visual \fIvisual\fP] [\-grid\-size \fIpixels\fP] [\-live\-color \fIcolor\fP] [\-dead\-color \fIcolor\fP] [\-solve\-delay \fIusecs\fP] [\-pre\-delay \fIusecs\fP] [\-post\-delay \fIusecs\fP] [\-generator \fIinteger\fP] [\-max\-length \fIinteger\fP] [\-bridge] [\-no\-bridge]
7 .SH DESCRIPTION
8 The \fImaze\fP program creates a "random" maze and then solves it with 
9 graphical feedback. 
10 .SH OPTIONS
11 .I maze
12 accepts the following options:
13 .TP 8
14 .B \-window
15 Draw on a newly-created window.  This is the default.
16 .TP 8
17 .B \-root
18 Draw on the root window.
19 .TP 8
20 .B \-install
21 Install a private colormap for the window.
22 .TP 8
23 .B \-visual \fIvisual\fP
24 Specify which visual to use.  Legal values are the name of a visual class,
25 or the id number (decimal or hex) of a specific visual.
26 .TP 8
27 .B \-grid\-size \fIpixels\fP
28 The size of each block of the maze, in pixels; default is 0, meaning
29 pick a random grid size.
30 .TP 8
31 .B \-live\-color \fIcolor\fP
32 The color of the path.
33 .TP 8
34 .B \-dead\-color \fIcolor\fP
35 The color of the failed path (it is also stippled with a 50% pattern.)
36 .TP 8
37 .B \-solve\-delay \fIinteger\fP
38 Delay (in microseconds) between each step of the solution path.
39 Default 5000, or about 1/200th second.
40 .TP 8
41 .B \-pre\-delay \fIinteger\fP
42 Delay (in microseconds) between generating a maze and starting to solve it.
43 Default 2000000 (2 seconds.)
44 .TP 8
45 .B \-post\-delay \fIinteger\fP
46 Delay (in microseconds) after solving a maze and before generating a new one.
47 Default 4000000 (4 seconds.)
48 .TP 8
49 .B \-generator \fInum\fP
50 Sets the algorithm that will be used to generate the mazes. The
51 default is \-1, which randomly selects an algorithm for each maze that
52 is generated. Generator 0 is the original one, and works by walking
53 around randomly until we hit a place we've been before, then
54 backtracking and trying a new direction somewhere. Generator 1 picks a
55 random spot in the maze, then draws a straight wall from that spot in
56 a random direction until it hits another wall (and continues until the
57 maze is complete). Generator 2 is based on sets. Initially all cells
58 are in different sets. Then two neighboring cells are chosen and if
59 they are in different sets, their sets are joined. If they were in the
60 same set, a wall is built between them. This continues until the maze is
61 complete. 
62
63 All generators generate mazes with a certain 'characteristic'. See if you
64 can spot them!
65 .TP 8
66 .B \-max\-length \fInum\fP
67 Controls the maximum length of walls drawn in one go by generator 1.
68 .TP 8
69 .B \-bridge
70 .TP 8
71 .B \-no\-bridge
72 Controls whether or not a 'bridge' will appear over the logo.
73 .PP
74 Clicking the mouse in the maze window controls it.
75 .TP 16
76 .B "LeftButton
77 Clears the window and restarts maze.
78 .TP 16
79 .B MiddleButton
80 Pause or unpause the program.
81 .TP 16
82 .B RightButton
83 Exit.
84 .SH BUGS
85 Expose events force a restart of maze.
86
87 Mouse actions are based on "raw" values (Button1, Button2 and Button3)
88 instead of using the pointer map.
89 .SH ENVIRONMENT
90 .PP
91 .TP 8
92 .B DISPLAY
93 to get the default host and display number.
94 .TP 8
95 .B XENVIRONMENT
96 to get the name of a resource file that overrides the global resources
97 stored in the RESOURCE_MANAGER property.
98 .SH SEE ALSO
99 .BR X (1),
100 .BR xscreensaver (1)
101 .SH COPYRIGHT
102 .PP
103 Copyright \(co 1988 by Sun Microsystems, Inc. Mountain View, CA.
104 .PP  
105 All Rights Reserved
106 .PP
107 Permission to use, copy, modify, and distribute this software and its
108 documentation for any purpose and without fee is hereby granted, provided that
109 the above copyright notice appear in all copies and that both that copyright
110 notice and this permission notice appear in supporting documentation, and that
111 the names of Sun or MIT not be used in advertising or publicity pertaining to
112 distribution of the software without specific prior written permission. Sun
113 and M.I.T.  make no representations about the suitability of this software for
114 any purpose. It is provided "as is" without any express or implied warranty.
115 .PP
116 SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
117 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN
118 NO EVENT SHALL SUN BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
119 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
120 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
121 OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
122 .SH AUTHOR(s)
123 .nf
124 Johannes Keukelaar [ Generators 1 and 2 ] johannes@nada.kth.se 
125   Royal Institute of Technology, Stockholm, Sweden
126 Jim Randell     [ XScreenSaver version ] jmr@mddjmr.fc.hp.com
127   HPLabs, Bristol
128 Richard Hess    [ X11 extensions ]      {...}!uunet!cimshop!rhess
129   Consilium, Mountain View, CA
130 Dave Lemke      [ X11 version ]         lemke@sun.COM
131   Sun MicroSystems, Mountain View, CA
132 Martin Weiss    [ SunView version ]
133   Sun MicroSystems, Mountain View, CA
134 .fi