File: xtriangles.html

package info (click to toggle)
xpuzzles 8.8.7%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 18,792 kB
  • sloc: ansic: 153,465; makefile: 6,283; sh: 935; perl: 80
file content (335 lines) | stat: -rw-r--r-- 10,621 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
Content-type: text/html; charset=UTF-8

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of XTRIANGLES</TITLE>
</HEAD><BODY>
<H1>XTRIANGLES</H1>
Section: Games and Demos (6)<BR>Updated: 15 Aug 2024<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>

<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>

xtriangles - Triangles X widget
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>

<B>/usr/games/xtriangles</B>

[-geometry [{width}][x{height}][{+-}{xoff}[{+-}{yoff}]]]
[-display [{host}]:[{vs}]] [-[no]mono] [-[no]{reverse|rv}]
[-{foreground|fg} {color}] [-{background|bg} {color}]
[-tile {color}] [-text {color}] [-frame {color}]
[-[no]stippleFrame] [-delay msecs] [-[no]sound]
[-bumpSound {filename}] [-{font|fn} {fontname}]
[-size{X|Y} {int}] [-[no]corners] [-base {int}]
[-userName {string}] [-scoreFile {filename}] [-scores]
[-version]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>

A sliding tile puzzle.  A triangular version of the 15 puzzle which was
originally made around 1879 (the 14-15 puzzle of Sam Loyd was made soon
after).   T. R. Dawson in Original Puzzles has a similar puzzle with 4
diamond- and 6 triangular-shaped pieces.  This puzzle is easier to solve
than 15 puzzle with corner mode on and probably about the same with corner
mode off.
<A NAME="lbAE">&nbsp;</A>
<H2>FEATURES</H2>

<P>

If corners mode on: click &quot;<B>mouse-left</B>&quot; button to move a tile.
Notice that one can move more than one tile at a time by clicking on the tile
farthest from the spaces and in line with the spaces.  Clicks on the
spaces or clicks on tiles that are not in line with the spaces, will
not move tiles.
<BR>

If corners mode off: click &quot;<B>mouse-left</B>&quot; button to move a tile.
One can only move one tile at a time.  The only tiles that can be moved
are the tiles next to the space.  Clicks on the space, or clicks on
tiles that are not in line with the space, will not move tiles.
<P>

Click &quot;<B>mouse-right</B>&quot; button, or press &quot;<B>C</B>&quot; or &quot;<B>c</B>&quot; keys, to
clear the puzzle.
<P>

Press &quot;<B>G</B>&quot; or &quot;<B>g</B>&quot; keys to read (get) a saved puzzle.
<P>

Press &quot;<B>W</B>&quot; or &quot;<B>w</B>&quot; keys to save (write) a puzzle.
<P>

Press &quot;<B>U</B>&quot; or &quot;<B>u</B>&quot; keys to undo a move.
<P>

Press &quot;<B>R</B>&quot; or &quot;<B>r</B>&quot; keys to redo a move.
<P>

Press &quot;<B>Z</B>&quot; or &quot;<B>z</B>&quot; keys to randomize the puzzle.  New records
can only be set from a cleared state.
<P>

&quot;<B>S</B>&quot; or &quot;<B>s</B>&quot; keys reserved for the auto-solver (not implemented).
<P>

Press &quot;<B>M</B>&quot; or &quot;<B>m</B>&quot; keys to toggle corners mode.  (Default is on).
<P>

Press &quot;<B>&gt;</B>&quot; or &quot;<B>.</B>&quot; keys to speed up the movement of tiles.
<P>

Press &quot;<B>&lt;</B>&quot; or &quot;<B>,</B>&quot; keys to slow down the movement of tiles.
<P>

Press &quot;<B>@</B>&quot; key to toggle the sound.
<P>

Press &quot;<B>Esc</B>&quot; key to hide program.
<P>

Press &quot;<B>Q</B>&quot;, &quot;<B>q</B>&quot;, or &quot;<B>CTRL-C</B>&quot; keys to kill program.
<P>

Use the key pad or arrow keys to move without the mouse.
<BR>

Key pad is defined for Triangles as:
<BR>

7 8 9   Upper Left, Up (no corners), Upper Right
<P>
<BR>&nbsp;&nbsp;^
<P>
4&lt; &gt;6   Left, Right
<P>
<BR>&nbsp;&nbsp;v
<P>
1 2 3   Lower Left, Down (no corners), Lower Right
<P>

The control key allows you to change the complexity of xtriangles.  Hold
down control key and use the keypad or arrow keys to reduce or enlarge
puzzle complexity.
<P>

The title is in the following format (non-motif version):
<DL COMPACT><DT><DD>
xtriangles: &lt;size&gt; @ (&lt;Number of moves&gt;/{&lt;Record number of moves&gt;
&lt;user name&gt;|&quot;NEVER noaccess&quot;}) - &lt;Comment&gt;
</DL>

If there is no record of the current puzzle, it displays &quot;NEVER noaccess&quot;.
<A NAME="lbAF">&nbsp;</A>
<H2>OPTIONS</H2>

<DL COMPACT>
<DT><B>-geometry {+|-}</B><I>X</I>{+|-}<I>Y</I>

<DD>
This option sets the initial position of the triangles window (resource
name &quot;<I>geometry</I>&quot;).
<DT><B>-display </B><I>host</I>:<I>dpy</I>

<DD>
This option specifies the X server to contact.
<DT><B>-[no]mono</B>

<DD>
This option allows you to display the triangles window on a color screen
as if it were monochrome (resource name &quot;<I>mono</I>&quot;).
<DT><B>-[no]{reverse|rv}</B>

<DD>
This option allows you to see the triangles window in reverse video
(resource name &quot;<I>reverseVideo</I>&quot;).
<DT><B>-{foreground|fg} </B><I>color</I>

<DD>
This option specifies the foreground of the triangles window (resource name
&quot;<I>foreground</I>&quot;).
<DT><B>-{background|bg} </B><I>color</I>

<DD>
This option specifies the background of the triangles window (resource name
&quot;<I>background</I>&quot;).
<DT><B>-tile </B><I>color</I>

<DD>
This option specifies the tile color of the tiles in the triangles window
(resource name &quot;<I>tileColor</I>&quot;).
<DT><B>-text </B><I>color</I>

<DD>
This option specifies the text color of the tiles in the triangles window
(resource name &quot;<I>textColor</I>&quot;).
<DT><B>-frame </B><I>color</I>

<DD>
This option specifies the color of the frame (resource name
&quot;<I>frameColor</I>&quot;).
<DT><B>-[no]stippleFrame</B>

<DD>
This option allows you to toggle the frame stippling (resource name
&quot;<I>stippleFrame</I>&quot;).
<DT><B>-delay </B><I>msecs</I>

<DD>
This option specifies the number of milliseconds it takes to move a tile or
a group of tiles one space (1-50) (resource name &quot;<I>delay</I>&quot;).
<DT><B>-[no]sound</B>

<DD>
This option specifies if a sliding tile should make a sound or not
(resource name &quot;<I>sound</I>&quot;).
<DT><B>-bumpSound </B><I>filename</I>

<DD>
This option specifies the file for the bump sound for the sliding
the tiles (resource name &quot;<I>bumpSound</I>&quot;).
<DT><B>-{font|fn} </B>ontname

<DD>
This option specifies the font that will be used (resource name
&quot;<I>font</I>&quot;).
<DT><B>-size{X|Y} &lt;</B><I>int</I>&gt;

<DD>
This option allows you to change the number of triangles in a row or
column (resource names &quot;<I>sizeX</I>&quot;, &quot;<I>sizeY</I>&quot;).
<DT><B>-corners</B>

<DD>
This option specifies the mode where movement is very restrictive (resource
name &quot;<I>corners</I>&quot;).
<DT><B>-nocorners</B>

<DD>
This option specifies the mode where movement is very easy (resource name
<BR>&nbsp;&quot;<I>corners</I>&quot;).
<DT><B>-base </B><I>int</I>

<DD>
This option specifies the base used (default is base 10) (resource name
&quot;<I>base</I>&quot;).
<DT><B>-userName </B><I>string</I>

<DD>
This option specifies the user name for any records made or else it will
get your login name (resource name &quot;<I>userName</I>&quot;).
<DT><B>-scoreFile </B><I>filename</I>

<DD>
Specify an alternative score file (resource name &quot;<I>scoreFile</I>&quot;).
<DT><B>-scores</B>

<DD>
This option lists all the recorded scores and then exits.
<DT><B>-version</B>

<DD>
This option tells you what version of xtriangles you have.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>RECORDS</H2>

You must randomize or clear the puzzle before a record is set, otherwise
an assumption of cheating is made if it is solved after a get.
<A NAME="lbAH">&nbsp;</A>
<H2>SAVE FORMAT</H2>

Here is the format for the xtriangles configuration, starting position, and
the movement of its pieces.
<P>
<DL COMPACT><DT><DD>
corners: 0-1 &lt;0 false, 1 true; if 0 then triangle corners are all snipped&gt;
<BR>

sizeX: 1-10 &lt;number of top tiles in a row with the same orientation as the
puzzle&gt;
<BR>

sizeY: 1-10 &lt;number of rows of tiles&gt;
<BR>

moves: 0-MAXINT &lt;total number of moves&gt;
<P>
startingPosition: &lt;array of tile positions where 0 is the empty space for
the UP triangle and -1 is the empty space for the DOWN triangle&gt;
</DL>

<P>
This is then followed by the moves, starting from 1.
<DL COMPACT><DT><DD>
move #: &lt;direction&gt;
</DL>

Direction is represented as 0 upper right, 1 right, 2 lower right,
3 lower left, 4 left, and 5 upper left.
<A NAME="lbAI">&nbsp;</A>
<H2>REFERENCES</H2>

L. E. Horden, Sliding Piece Puzzles (Recreations in Mathematics Series),
Oxford University Press 1986, pp 1, 148, 149.
<P>
Jerry Slocum &amp; Jack Botermans, Puzzles Old &amp; New (How to Make and Solve
Them), University of Washington Press, Seattle, 1987, pp 126, 127.
<A NAME="lbAJ">&nbsp;</A>
<H2>SEE ALSO</H2>

<P>

<A HREF="/cgi-bin/man/man2html?1+X">X</A>(1), <A HREF="/cgi-bin/man/man2html?6+xcubes">xcubes</A>(6), <A HREF="/cgi-bin/man/man2html?6+xhexagons">xhexagons</A>(6), <A HREF="/cgi-bin/man/man2html?6+xmlink">xmlink</A>(6), <A HREF="/cgi-bin/man/man2html?6+xbarrel">xbarrel</A>(6), <A HREF="/cgi-bin/man/man2html?6+xpanex">xpanex</A>(6),
<A HREF="/cgi-bin/man/man2html?6+xmball">xmball</A>(6), <A HREF="/cgi-bin/man/man2html?6+xpyraminx">xpyraminx</A>(6), <A HREF="/cgi-bin/man/man2html?6+xoct">xoct</A>(6), <A HREF="/cgi-bin/man/man2html?6+xrubik">xrubik</A>(6), <A HREF="/cgi-bin/man/man2html?6+xskewb">xskewb</A>(6), <A HREF="/cgi-bin/man/man2html?6+xdino">xdino</A>(6),
<A HREF="/cgi-bin/man/man2html?6+xbevel">xbevel</A>(6),  <A HREF="/cgi-bin/man/man2html?6+xabacus">xabacus</A>(6)
<A NAME="lbAK">&nbsp;</A>
<H2>COPYRIGHTS</H2>

<P>

&#174; Copyright 1994-2024, David A. Bagley
<A NAME="lbAL">&nbsp;</A>
<H2>BUG REPORTS AND PROGRAM UPDATES</H2>

<P>

Send bugs (or their reports, or fixes) to the author:
<DL COMPACT><DT><DD>
David A. Bagley, &lt;<I>bagleyd AT verizon.net</I>&gt;
</DL>

<P>
The latest version is currently at:
<DL COMPACT><DT><DD>
<I><A HREF="https://www.sillycycle.com/puzzles.html">https://www.sillycycle.com/puzzles.html</A></I>
<BR>

<I><A HREF="http://www.ibiblio.org/pub/Linux/games/strategy/">http://www.ibiblio.org/pub/Linux/games/strategy/</A></I>
<P>
</DL>

<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">FEATURES</A><DD>
<DT><A HREF="#lbAF">OPTIONS</A><DD>
<DT><A HREF="#lbAG">RECORDS</A><DD>
<DT><A HREF="#lbAH">SAVE FORMAT</A><DD>
<DT><A HREF="#lbAI">REFERENCES</A><DD>
<DT><A HREF="#lbAJ">SEE ALSO</A><DD>
<DT><A HREF="#lbAK">COPYRIGHTS</A><DD>
<DT><A HREF="#lbAL">BUG REPORTS AND PROGRAM UPDATES</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 06:06:41 GMT, August 18, 2024
</BODY>
</HTML>