4 XScreenSaver(1) XScreenSaver(1)
8 maze - an automated X11 demo repeatedly creating and solv-
11 S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
12 m
\bma
\baz
\bze
\be [-display _
\bh_
\bo_
\bs_
\bt_
\b:_
\bd_
\bi_
\bs_
\bp_
\bl_
\ba_
\by_
\b._
\bs_
\bc_
\br_
\be_
\be_
\bn] [-foreground _
\bc_
\bo_
\bl_
\bo_
\br]
13 [-background _
\bc_
\bo_
\bl_
\bo_
\br] [-window] [-root] [-install] [-visual
14 _
\bv_
\bi_
\bs_
\bu_
\ba_
\bl] [-grid-size _
\bp_
\bi_
\bx_
\be_
\bl_
\bs] [-live-color _
\bc_
\bo_
\bl_
\bo_
\br]
15 [-dead-color _
\bc_
\bo_
\bl_
\bo_
\br] [-solve-delay _
\bu_
\bs_
\be_
\bc_
\bs] [-pre-delay
16 _
\bu_
\bs_
\be_
\bc_
\bs] [-post-delay _
\bu_
\bs_
\be_
\bc_
\bs] [-generator _
\bi_
\bn_
\bt_
\be_
\bg_
\be_
\br]
17 [-max-length _
\bi_
\bn_
\bt_
\be_
\bg_
\be_
\br] [-bridge] [-no-bridge]
19 D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
20 The _
\bm_
\ba_
\bz_
\be program creates a "random" maze and then solves
21 it with graphical feedback.
23 O
\bOP
\bPT
\bTI
\bIO
\bON
\bNS
\bS
24 _
\bm_
\ba_
\bz_
\be accepts the following options:
26 -
\b-w
\bwi
\bin
\bnd
\bdo
\bow
\bw Draw on a newly-created window. This is the
29 -
\b-r
\bro
\boo
\bot
\bt Draw on the root window.
31 -
\b-i
\bin
\bns
\bst
\bta
\bal
\bll
\bl
32 Install a private colormap for the window.
34 -
\b-v
\bvi
\bis
\bsu
\bua
\bal
\bl _
\bv_
\bi_
\bs_
\bu_
\ba_
\bl
35 Specify which visual to use. Legal values are the
36 name of a visual class, or the id number (decimal
37 or hex) of a specific visual.
39 -
\b-g
\bgr
\bri
\bid
\bd-
\b-s
\bsi
\biz
\bze
\be _
\bp_
\bi_
\bx_
\be_
\bl_
\bs
40 The size of each block of the maze, in pixels;
41 default is 0, meaning pick a random grid size.
43 -
\b-l
\bli
\biv
\bve
\be-
\b-c
\bco
\bol
\blo
\bor
\br _
\bc_
\bo_
\bl_
\bo_
\br
44 The color of the path.
46 -
\b-d
\bde
\bea
\bad
\bd-
\b-c
\bco
\bol
\blo
\bor
\br _
\bc_
\bo_
\bl_
\bo_
\br
47 The color of the failed path (it is also stippled
50 -
\b-s
\bsk
\bki
\bip
\bp-
\b-c
\bco
\bol
\blo
\bor
\br _
\bc_
\bo_
\bl_
\bo_
\br
51 The maze solver will choose to not go down a path
52 if it can "see" (in a straight line) that it is a
53 dead end. This is the color to use for paths that
54 are skipped for this reason.
56 -
\b-s
\bsu
\bur
\brr
\bro
\bou
\bun
\bnd
\bd-
\b-c
\bco
\bol
\blo
\bor
\br _
\bc_
\bo_
\bl_
\bo_
\br
57 If the maze solver ever completely encloses an
58 area within the maze, then it knows that the exit
59 is not in there (and in fact the interior of that
60 area might not even be reachable.) It will mark
64 X Version 11 7-mar-93 1
70 XScreenSaver(1) XScreenSaver(1)
73 out those cells using this color.
75 -
\b-s
\bso
\bol
\blv
\bve
\be-
\b-d
\bde
\bel
\bla
\bay
\by _
\bi_
\bn_
\bt_
\be_
\bg_
\be_
\br
76 Delay (in microseconds) between each step of the
77 solution path. Default 5000, or about 1/200th
80 -
\b-p
\bpr
\bre
\be-
\b-d
\bde
\bel
\bla
\bay
\by _
\bi_
\bn_
\bt_
\be_
\bg_
\be_
\br
81 Delay (in microseconds) between generating a maze
82 and starting to solve it. Default 2000000 (2 sec-
85 -
\b-p
\bpo
\bos
\bst
\bt-
\b-d
\bde
\bel
\bla
\bay
\by _
\bi_
\bn_
\bt_
\be_
\bg_
\be_
\br
86 Delay (in microseconds) after solving a maze and
87 before generating a new one. Default 4000000 (4
90 -
\b-g
\bge
\ben
\bne
\ber
\bra
\bat
\bto
\bor
\br _
\bn_
\bu_
\bm
91 Sets the algorithm that will be used to generate
92 the mazes. The default is -1, which randomly
93 selects an algorithm for each maze that is gener-
94 ated. Generator 0 is the original one, and works
95 by walking around randomly until we hit a place
96 we've been before, then backtracking and trying a
97 new direction somewhere. Generator 1 picks a ran-
98 dom spot in the maze, then draws a straight wall
99 from that spot in a random direction until it hits
100 another wall (and continues until the maze is com-
101 plete). Generator 2 is based on sets. Initially
102 all cells are in different sets. Then two neigh-
103 boring cells are chosen and if they are in differ-
104 ent sets, their sets are joined. If they were in
105 the same set, a wall is built between them. This
106 continues until the maze is complete.
108 All generators generate mazes with a certain
109 'characteristic'. See if you can spot them!
111 -
\b-m
\bma
\bax
\bx-
\b-l
\ble
\ben
\bng
\bgt
\bth
\bh _
\bn_
\bu_
\bm
112 Controls the maximum length of walls drawn in one
115 -
\b-b
\bbr
\bri
\bid
\bdg
\bge
\be
117 -
\b-n
\bno
\bo-
\b-b
\bbr
\bri
\bid
\bdg
\bge
\be
118 Controls whether or not a 'bridge' will appear
121 Clicking the mouse in the maze window controls it.
123 L
\bLe
\bef
\bft
\btB
\bBu
\but
\btt
\bto
\bon
\bn Clears the window and restarts maze.
125 M
\bMi
\bid
\bdd
\bdl
\ble
\beB
\bBu
\but
\btt
\bto
\bon
\bn Pause or unpause the program.
130 X Version 11 7-mar-93 2
136 XScreenSaver(1) XScreenSaver(1)
139 R
\bRi
\big
\bgh
\bht
\btB
\bBu
\but
\btt
\bto
\bon
\bn Exit.
142 Expose events force a restart of maze.
144 Mouse actions are based on "raw" values (Button1, Button2
145 and Button3) instead of using the pointer map.
147 E
\bEN
\bNV
\bVI
\bIR
\bRO
\bON
\bNM
\bME
\bEN
\bNT
\bT
148 D
\bDI
\bIS
\bSP
\bPL
\bLA
\bAY
\bY to get the default host and display number.
150 X
\bXE
\bEN
\bNV
\bVI
\bIR
\bRO
\bON
\bNM
\bME
\bEN
\bNT
\bT
151 to get the name of a resource file that overrides
152 the global resources stored in the RESOURCE_MAN-
155 S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
156 X
\bX(1), x
\bxs
\bsc
\bcr
\bre
\bee
\ben
\bns
\bsa
\bav
\bve
\ber
\br(1)
158 C
\bCO
\bOP
\bPY
\bYR
\bRI
\bIG
\bGH
\bHT
\bT
159 Copyright (C) 1988 by Sun Microsystems, Inc. Mountain
164 Permission to use, copy, modify, and distribute this soft-
165 ware and its documentation for any purpose and without fee
166 is hereby granted, provided that the above copyright
167 notice appear in all copies and that both that copyright
168 notice and this permission notice appear in supporting
169 documentation, and that the names of Sun or MIT not be
170 used in advertising or publicity pertaining to distribu-
171 tion of the software without specific prior written per-
172 mission. Sun and M.I.T. make no representations about the
173 suitability of this software for any purpose. It is pro-
174 vided "as is" without any express or implied warranty.
176 SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
177 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
178 FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE
179 LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
180 OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
181 OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
182 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
183 WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
185 A
\bAU
\bUT
\bTH
\bHO
\bOR
\bR(
\b(s
\bs)
\b)
186 Zack Weinberg [ Smarter maze-solver ] zack@rabi.phys.columbia.edu
187 Johannes Keukelaar [ Generators 1 and 2 ] johannes@nada.kth.se
188 Royal Institute of Technology, Stockholm, Sweden
189 Jim Randell [ XScreenSaver version ] jmr@mddjmr.fc.hp.com
191 Richard Hess [ X11 extensions ] {...}!uunet!cimshop!rhess
192 Consilium, Mountain View, CA
196 X Version 11 7-mar-93 3
202 XScreenSaver(1) XScreenSaver(1)
205 Dave Lemke [ X11 version ] lemke@sun.COM
206 Sun MicroSystems, Mountain View, CA
207 Martin Weiss [ SunView version ]
208 Sun MicroSystems, Mountain View, CA
262 X Version 11 7-mar-93 4