Merge lp:~jtaylor/ubuntu/precise/gnome-games/lp-995281 into lp:ubuntu/precise/gnome-games

Proposed by Julian Taylor
Status: Merged
Merge reported by: Marc Deslauriers
Merged at revision: not available
Proposed branch: lp:~jtaylor/ubuntu/precise/gnome-games/lp-995281
Merge into: lp:ubuntu/precise/gnome-games
Diff against target: 22348 lines (+18525/-3472)
43 files modified
.pc/90_fix-help-links.patch/glchess/help/C/glchess.xml (+763/-0)
.pc/90_fix-help-links.patch/glchess/help/Makefile.am (+15/-0)
.pc/90_fix-help-links.patch/gnect/help/C/gnect.xml (+529/-0)
.pc/90_fix-help-links.patch/gnect/help/Makefile.am (+16/-0)
.pc/90_fix-help-links.patch/gnibbles/help/C/gnibbles.xml (+592/-0)
.pc/90_fix-help-links.patch/gnibbles/help/Makefile.am (+18/-0)
.pc/90_fix-help-links.patch/gnobots2/help/C/gnobots2.xml (+666/-0)
.pc/90_fix-help-links.patch/gnobots2/help/Makefile.am (+13/-0)
.pc/90_fix-help-links.patch/gnotski/help/C/gnotski.xml (+407/-0)
.pc/90_fix-help-links.patch/gnotski/help/Makefile.am (+14/-0)
.pc/90_fix-help-links.patch/gtali/help/C/gtali.xml (+492/-0)
.pc/90_fix-help-links.patch/gtali/help/Makefile.am (+14/-0)
.pc/applied-patches (+4/-0)
.pc/cant_castle_after_rook_taken.patch/glchess/src/chess-game.vala (+1428/-0)
.pc/en_passant_pawns_only.patch/glchess/src/chess-game.vala (+1424/-0)
.pc/en_passant_remove_victim.patch/glchess/src/chess-game.vala (+1424/-0)
debian/changelog (+26/-0)
debian/control (+1/-1)
debian/patches/90_fix-help-links.patch (+7053/-0)
debian/patches/cant_castle_after_rook_taken.patch (+40/-0)
debian/patches/en_passant_pawns_only.patch (+40/-0)
debian/patches/en_passant_remove_victim.patch (+42/-0)
debian/patches/fix-glines-crash.patch (+16/-0)
debian/patches/series (+5/-0)
glchess/help/C/glchess.xml (+0/-763)
glchess/help/C/index.docbook (+763/-0)
glchess/help/Makefile.am (+1/-1)
glchess/src/chess-game.vala (+27/-11)
gnect/help/C/gnect.xml (+0/-529)
gnect/help/C/index.docbook (+529/-0)
gnect/help/Makefile.am (+2/-4)
gnibbles/help/C/gnibbles.xml (+0/-592)
gnibbles/help/C/index.docbook (+592/-0)
gnibbles/help/Makefile.am (+1/-3)
gnobots2/help/C/gnobots2.xml (+0/-666)
gnobots2/help/C/index.docbook (+666/-0)
gnobots2/help/Makefile.am (+1/-1)
gnotski/help/C/gnotski.xml (+0/-407)
gnotski/help/C/index.docbook (+407/-0)
gnotski/help/Makefile.am (+1/-1)
gtali/help/C/gtali.xml (+0/-492)
gtali/help/C/index.docbook (+492/-0)
gtali/help/Makefile.am (+1/-1)
To merge this branch: bzr merge lp:~jtaylor/ubuntu/precise/gnome-games/lp-995281
Reviewer Review Type Date Requested Status
Ubuntu Development Team Pending
Review via email: mp+141287@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory '.pc/90_fix-help-links.patch'
=== added directory '.pc/90_fix-help-links.patch/glchess'
=== added directory '.pc/90_fix-help-links.patch/glchess/help'
=== added directory '.pc/90_fix-help-links.patch/glchess/help/C'
=== added file '.pc/90_fix-help-links.patch/glchess/help/C/glchess.xml'
--- .pc/90_fix-help-links.patch/glchess/help/C/glchess.xml 1970-01-01 00:00:00 +0000
+++ .pc/90_fix-help-links.patch/glchess/help/C/glchess.xml 2012-12-26 19:18:24 +0000
@@ -0,0 +1,763 @@
1<?xml version="1.0"?>
2<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
4 <!ENTITY legal SYSTEM "legal.xml">
5 <!ENTITY appversion "2.18">
6 <!ENTITY manrevision "2.18">
7 <!ENTITY date "December">
8 <!ENTITY app "<application>Chess</application>">
9 <!ENTITY appname "Chess">
10 <!ENTITY version "2.22">
11]>
12
13<!--
14 (Do not remove this comment block.)
15 Maintained by the GNOME Documentation Project
16 http://developer.gnome.org/projects/gdp
17 Template version: 2.0 beta
18 Template last modified Feb 12, 2002
19-->
20
21<!-- =============Document Header ============================= -->
22<article id="index" lang="en">
23<!-- please do not change the id; for translations, change lang to -->
24<!-- appropriate code -->
25<articleinfo>
26 <title>&app; Manual</title>
27
28 <abstract role="description">
29 <para>
30 glChess is a game for playing the classic board game of chess,
31 in which two players simulate a battle by capturing the opponents
32 pieces and ultimately the king. It can be played in 2D or 3D mode,
33 full screen or in a window.
34 </para>
35 </abstract>
36 <copyright>
37 <year>2006-2008</year>
38 <holder>Andreas Røsdal</holder>
39 </copyright>
40<!-- translators: uncomment this:
41
42 <copyright>
43 <year>2002</year>
44 <holder>ME-THE-TRANSLATOR (Latin translation)</holder>
45 </copyright>
46
47 -->
48<!-- An address can be added to the publisher information. If a role is
49 not specified, the publisher/author is the same for all versions of the
50 document. -->
51 <publisher role="maintainer">
52 <publishername> GNOME Documentation Project </publishername>
53 </publisher>
54
55 &legal;
56 <!-- This file contains link to license for the documentation (GNU FDL), and
57 other legal stuff such as "NO WARRANTY" statement. Please do not change
58 any of this. -->
59
60 <authorgroup>
61 <author>
62 <firstname>Andreas</firstname>
63 <surname>Røsdal</surname>
64 <affiliation>
65 <address> <email>andrearo@pvv.ntnu.no</email> </address>
66 </affiliation>
67 </author>
68<!-- This is appropriate place for other contributors: translators,
69 maintainers, etc. Commented out by default.
70 <othercredit role="translator">
71 <firstname>Latin</firstname>
72 <surname>Translator 1</surname>
73 <affiliation>
74 <orgname>Latin Translation Team</orgname>
75 <address> <email>translator@gnome.org</email> </address>
76 </affiliation>
77 <contrib>Latin translation</contrib>
78 </othercredit>
79-->
80 </authorgroup>
81
82 <releaseinfo revision="2.26" role="review"/>
83
84<revhistory>
85 <revision>
86 <revnumber>&appname; Manual V&manrevision;</revnumber>
87 <date>&date;</date>
88 <revdescription>
89 <para role="author">Andreas Røsdal
90 <email>andrearo@pvv.ntnu.no</email>
91 </para>
92 <para role="publisher">GNOME Documentation Project</para>
93 </revdescription>
94 </revision>
95 <revision>
96 <revnumber>1</revnumber>
97 <date>December 2006</date>
98 <authorinitials>AR</authorinitials>
99 <revremark>
100 First draft completed.
101 </revremark>
102 </revision>
103 </revhistory>
104
105 <releaseinfo>This manual describes version &appversion; of &appname;.
106 </releaseinfo>
107 <!-- The following feedback information only applies to appliactions
108 listed in bugzilla.gnome.org and bugzilla.ximian.com. For other
109 applications, please provide your own feedback info or remove thsi
110 section altogether -->
111 <legalnotice>
112 <title>Feedback</title>
113 <para>To report a bug or make a suggestion regarding the &app; application or
114 this manual, follow the directions in the
115 <ulink url="ghelp:user-guide?feedback-bugs"
116 type="help">GNOME Feedback Page</ulink>.
117 </para>
118<!-- Translators may also add here feedback address for translations -->
119 </legalnotice>
120
121</articleinfo>
122
123 <indexterm zone="index">
124 <primary>glChess</primary>
125 </indexterm>
126
127<!-- ============= Document Body ============================= -->
128<!-- ============= Introduction ============================== -->
129<sect1 id="intro">
130 <title>Introduction</title>
131 <sect2 id="what">
132 <title>Overview of Chess</title>
133
134 <para>
135 Chess is a two-player strategy board game. <application>glChess</application> is a 2D/3D chess game, where games
136 can be played between a combination of human and computer players. glChess detects known third party chess engines
137 for computer players. The game was originally developed by Robert Ancell, now the game is included in gnome-games.
138 </para>
139
140 <para>
141 <application>glChess</application> is written in Python and uses GTK+ and Cairo to render the chess board. 3D support is
142 optionally available using OpenGl,
143 using the Python OpenGL and GtkGLExt libraries. As with most modern 3D programs hardware acceleration is recommended but it should
144 run OK in software. glChess is bundled with GNU Chess as the default chess AI. glChess can be played in network mode against
145 other players on the Internet.
146 </para>
147 <para>
148 Chess is played on a square chessboard, consisting of 64 squares of alternating color. Each player begins the game with sixteen pieces: one king, one queen, two rooks, two knights, two bishops, and eight pawns. One player controls the white pieces and the other player controls the black pieces; the player that controls white is the first to move. The players take turns moving pieces; certain moves involve a "capturing" of an opponent's piece, removing it from the chessboard. The object of the game is to checkmate the opponent's king. This occurs when the king is under immediate attack (in check) and there is no way to remove it from attack on the next move. Theoreticians have developed extensive chess strategies and tactics since the game's inception.
149</para>
150<para>
151The current form of the game emerged in South Europe in the second half of the 15th century after evolving from similar, much older games of Asian origin. Chess is one of the world's most popular board games. The tradition of competitive chess began in the 16th century. The first official World Chess Champion, Wilhelm Steinitz, claimed his title in 1886; his modern equivalent, Vladimir Kramnik, is the 14th Champion in the lineage. There are also biennial world team events called Chess Olympiads. Since the 20th century, two international organizations, the World Chess Federation and the International Correspondence Chess Federation have organized and overseen the top chess competitions and international titles.
152</para>
153<para>
154One of the goals of early computer scientists was to create a chess-playing machine, and today's chess is deeply influenced by the overwhelming abilities of current chess programs. In 1997, a match between Garry Kasparov, then World Champion, and IBM's Deep Blue chess program proved that computers are able to beat even the strongest human players.
155</para>
156
157 <para>
158 To run <application>glChess</application>, select
159 <guimenuitem>Chess</guimenuitem> from the
160 <guisubmenu>Games</guisubmenu> submenu of the <guimenu>Main
161 Menu</guimenu>, or type <command>glchess</command> on the
162 command line.
163 </para>
164 </sect2>
165
166</sect1>
167
168
169<sect1 id="playing-glchess">
170 <title>Playing glChess</title>
171 <sect2 id="main-game-window">
172<title>Main game window</title>
173
174 <para>
175Starting glChess displays the main game window as shown below. The game is played
176by moving chess pieces using the mouse. Each player alternates to move a piece in the appropriate
177colour, from one board position to another valid board position.
178The main game window is organized in three main areas: In the top menu and toolbar area,
179most common game actions can be made. The chess board is in the middle of the window,
180where the game is played by moving chess pieces using the mouse. Finally, the game
181history panel is shown at the bottom, where information about the game history, the remaining
182move time and buttons for showing previous or next moves are available.
183</para>
184
185 <figure id="main-game-shot">
186 <title>Main window in glChess</title>
187 <screenshot>
188 <mediaobject>
189 <imageobject>
190 <imagedata fileref="figures/game.png" format="PNG" srccredit="Andreas"/>
191 </imageobject>
192 <textobject>
193 <phrase>Main window in glChess.</phrase>
194 </textobject>
195 </mediaobject>
196 </screenshot>
197 </figure>
198</sect2>
199
200<sect2>
201<title>Starting a new game</title>
202<para>
203To start a new game, press the <guibutton>New Game</guibutton> buttton on the toolbar.
204The new game dialog is then shown, which allows you to setup a new game with the settings
205of your choice. In the <interface>game properties</interface> section, the game name and time-limit for
206each player's move is set. In the <interface>players</interface> section, it is possible to setup the
207number of human and AI players. If you have installed any supported chess engines as AI players,
208these will be displayed in the list of available players. Finally, the difficulty setting of the AI
209players is set in the <interface>difficulty</interface> section.
210</para>
211
212 <figure id="new-game-shot">
213 <title>Start new game dialog</title>
214 <screenshot>
215 <mediaobject>
216 <imageobject>
217 <imagedata fileref="figures/new_game.png" format="PNG" srccredit="Andreas"/>
218 </imageobject>
219 <textobject>
220 <phrase>Start new game dialog for glChess.</phrase>
221 </textobject>
222 </mediaobject>
223 </screenshot>
224 </figure>
225
226</sect2>
227
228
229
230
231<sect2 id="menubar">
232 <title>Menus</title>
233 <para>
234 The menu bar, located at the top of the <interface>Main
235 Window</interface>, contains the following menus:
236 </para>
237
238 <variablelist>
239 <varlistentry>
240 <term><guimenu>Game</guimenu></term>
241 <listitem>
242 <para>
243 This menu contains:
244 <itemizedlist>
245 <listitem>
246 <para>
247 <menuchoice>
248 <shortcut>
249 <keysym>Ctrl+N</keysym>
250 </shortcut>
251 <guimenuitem>New</guimenuitem>
252 </menuchoice>
253 This starts a new game of <application>Chess</application>.
254 </para>
255 </listitem>
256 <listitem>
257 <para>
258 <menuchoice>
259 <shortcut>
260 <keysym>Ctrl+O</keysym>
261 </shortcut>
262 <guimenuitem>Open</guimenuitem>
263 </menuchoice>
264 Loads a previously saved game.
265 </para>
266 </listitem>
267 <listitem>
268 <para>
269 <menuchoice>
270 <shortcut>
271 <keysym>Ctrl+S</keysym>
272 </shortcut>
273 <guimenuitem>Save</guimenuitem>
274 </menuchoice>
275 Saves the current game of chess.
276 </para>
277 </listitem>
278 <listitem>
279 <para>
280 <menuchoice>
281 <guimenuitem>Save As</guimenuitem>
282 </menuchoice>
283 Saves the current game of chess with a new filename.
284 </para>
285 </listitem>
286
287 <listitem>
288 <para>
289 <menuchoice>
290 <shortcut>
291 <keysym>Ctrl+L</keysym>
292 </shortcut>
293 <guimenuitem>Network Game</guimenuitem>
294 </menuchoice>
295 This starts a network multiplayer game using GGZ Gaming Zone.
296 </para>
297 </listitem>
298 <listitem>
299 <para>
300 <menuchoice>
301 <guimenuitem>Resign</guimenuitem>
302 </menuchoice>
303 To concede loss of the game, so that the opponent wins the game.
304 </para>
305 </listitem>
306 <listitem>
307 <para>
308 <menuchoice>
309 <guimenuitem>Claim Draw</guimenuitem>
310 </menuchoice>
311 If a claimed draw is accepted, the game ends without victory for either player.
312 </para>
313 </listitem>
314 <listitem>
315 <para>
316 <menuchoice>
317 <shortcut>
318 <keysym>Ctrl+Q</keysym>
319 </shortcut>
320 <guimenuitem>Quit</guimenuitem>
321 </menuchoice>
322 Ends the game.
323 </para>
324 </listitem>
325 </itemizedlist>
326 </para>
327 </listitem>
328 </varlistentry>
329
330
331 <varlistentry>
332 <term><guimenu>View</guimenu></term>
333 <listitem>
334 <para>
335 This menu contains:
336 <itemizedlist>
337 <listitem>
338 <para>
339 <menuchoice>
340 <shortcut>
341 <keysym>F11</keysym>
342 </shortcut>
343 <guimenuitem>Fullscreen</guimenuitem>
344 </menuchoice>
345 Shows the game window in fullscreen mode.
346 </para>
347 </listitem>
348 <listitem>
349 <para>
350 <menuchoice>
351 <guimenuitem>3D Chess View</guimenuitem>
352 </menuchoice>
353 Enables 3D chess view mode using OpenGL. This requires Python OpenGL and Python GTKGLExt installed,
354 in addition to a 3D graphics card setup properly. Please contact your system administrator if you have problems,
355 either way you will always be able to play chess in 2D mode.
356 </para>
357 </listitem>
358 <listitem>
359 <para>
360 <menuchoice>
361 <guimenuitem>Show Logs</guimenuitem>
362 </menuchoice>
363 Show logs for debugging glChess and the active chess AI engines.
364 </para>
365 </listitem>
366 </itemizedlist>
367 </para>
368 </listitem>
369 </varlistentry>
370
371 <varlistentry>
372 <term><guimenu>Settings</guimenu></term>
373 <listitem>
374 <para>
375 This menu contains:
376 <itemizedlist>
377 <listitem>
378 <para>
379 <menuchoice>
380 <guimenuitem>Preferences</guimenuitem>
381 </menuchoice>
382 This opens your window to edit <link linkend="prefs">
383 preferences.</link>
384 </para>
385 </listitem>
386 </itemizedlist>
387 </para>
388 </listitem>
389 </varlistentry>
390
391 <varlistentry>
392 <term><guimenu>Help</guimenu></term>
393 <listitem>
394 <para>
395 This menu contains:
396 <itemizedlist>
397 <listitem>
398 <para>
399 <menuchoice>
400 <shortcut>
401 <keysym>F1</keysym>
402 </shortcut>
403 <guimenuitem>Contents</guimenuitem>
404 </menuchoice>
405 Display this manual.
406 </para>
407 <para>
408 <guimenuitem>About</guimenuitem> This opens the
409 <interface>About</interface> dialog which shows
410 basic information about
411 <application>glChess</application>, such as
412 the author's name, the version number of the game.
413 </para>
414 </listitem>
415 </itemizedlist>
416 </para>
417 </listitem>
418 </varlistentry>
419 </variablelist>
420
421
422</sect2>
423
424
425</sect1>
426
427
428<sect1 id="chess-rules">
429 <title>Chess Rules</title>
430 <sect2 id="rules-of-chess">
431 <title>The Rules of Chess</title>
432<!--
433The reference for this chapter is http://en.wikipedia.org/wiki/Chess
434-->
435 <para>
436Chess is played on a square board of eight rows (called ranks and denoted with numbers 1 to 8) and eight columns (called files and denoted with letters a to h) of squares. The colors of the sixty-four squares alternate between light and dark, and are referred to as "light squares" and "dark squares". The chessboard is placed so that each player has a white square in the near right hand corner, and the pieces are set out as shown in the diagram, with each queen on a square that matches its color.
437</para><para>
438Each player begins the game with sixteen pieces: each player's pieces comprise one king, one queen, two rooks, two bishops, two knights and eight pawns. One player, referred to as White, controls the white pieces and the other player, Black, controls the black pieces; White is always the first player to move. The colors are chosen either by a friendly agreement, by a game of chance or by a tournament director. The players alternate moving one piece at a time (with the exception of castling, when two pieces are moved at the same time). Pieces are moved to either an unoccupied square, or one occupied by an opponent's piece, capturing it and removing it from play. With one exception (en passant), all pieces capture opponent's pieces by moving to the square that the opponent's piece occupies.
439</para>
440 <sect3 id="rules-piece-king">
441 <title>King</title>
442<para>When a king is under direct attack by one (or possibly two) of the opponent's pieces, the player is said to be in check. When in check, only moves that remove the king from attack are permitted. The player must not make any move that would place his king in check. The object of the game is to checkmate the opponent; this occurs when the opponent's king is in check, and there are no moves that remove the king from attack.
443
444</para><para>
445 The king can move only one square horizontally, vertically, or diagonally. Once in the game, each king is allowed to make a special double move, to castle. Castling consists of moving the king two squares towards a rook, then moving the rook onto the square over which the king crossed. Castling is only permissible if all of the following conditions hold:
446</para>
447<itemizedlist spacing="compact">
448 <listitem>
449 <para>The player must never have moved both the king and the rook involved in castling.</para>
450 </listitem>
451 <listitem>
452 <para>There must be no pieces between the king and the rook.</para>
453 </listitem>
454 <listitem>
455 <para>The king may not currently be in check, nor may the king pass through squares that are under attack by enemy pieces. As with any move, castling is illegal if it would place the king in check.</para>
456 </listitem>
457 <listitem>
458 <para>The king and the rook must be on the same rank (to exclude castling with a promoted pawn).</para>
459 </listitem>
460</itemizedlist>
461</sect3>
462 <sect3 id="rules-piece-rook">
463 <title>Rook</title>
464<para>
465 The rook moves any number of vacant squares vertically or horizontally (it is also involved in the king's special move of castling).
466</para>
467</sect3>
468 <sect3 id="rules-piece-bishop">
469 <title>Bishop</title>
470<para>
471 The bishop moves any number of vacant squares in any direction diagonally. Note that a bishop never changes square color, therefore players speak about "light-squared" or "dark-squared" bishops.
472</para>
473</sect3>
474 <sect3 id="rules-piece-queen">
475 <title>Queen</title>
476<para>
477 The queen can move any number of vacant squares diagonally, horizontally, or vertically.
478</para>
479</sect3>
480 <sect3 id="rules-piece-knight">
481 <title>Knight</title>
482<para>
483 The knight can jump over occupied squares and moves two spaces horizontally and one space vertically or vice versa, making an "L" shape. A knight in the middle of the board has eight squares to which it can move. Note that every time a knight moves, it changes square color.
484
485</para>
486</sect3>
487 <sect3 id="rules-piece-pawns">
488 <title>Pawns</title>
489<para>
490
491 Pawns have the most complex rules of movement: A pawn can move forward one square, if that square is unoccupied. If it has not moved yet, the pawn has the option of moving two squares forward, if both squares in front of the pawn are unoccupied. A pawn cannot move backward. When such an initial two square advance is made that puts that pawn horizontally adjacent to an opponent's pawn, the opponent's pawn can capture that pawn "en passant" as if it moved forward only one square rather than two, but only on the immediately subsequent move. Pawns are the only pieces that capture differently than they move. They can capture an enemy piece on either of the two spaces adjacent to the space in front of them (i.e., the two squares diagonally in front of them), but cannot move to these spaces if they are vacant. If a pawn advances all the way to its eighth rank, it is then promoted (converted) to a queen, rook, bishop, or knight of the same color. In practice, the pawn is almost always promoted to a queen.
492</para>
493</sect3>
494
495<sect3 id="rules-movement-others">
496<title>Remaining movement rules</title>
497<para>
498With the exception of the knight, pieces cannot jump over each other. One's own pieces ("friendly pieces") cannot be passed if they are in the line of movement, and a friendly piece can never replace another friendly piece. Enemy pieces cannot be passed, but they can be "captured". When a piece is captured (or taken), the attacking piece replaces the enemy piece on its square (en passant being the only exception). The captured piece is thus removed from the game and may not be returned to play for the remainder of the game. The king cannot be captured, only put in check. If a player is unable to get the king out of check, checkmate results, with the loss of the game.
499
500</para><para>
501Chess games do not have to end in checkmate — either player may resign if the situation looks hopeless. Games also may end in a draw (tie). A draw can occur in several situations, including draw by agreement, stalemate, threefold repetition of a position, the fifty move rule, or a draw by impossibility of checkmate (usually because of insufficient material to checkmate).
502</para>
503</sect3>
504</sect2>
505
506
507<sect2 id="timed-games">
508<title>Timed Games</title>
509<para>
510Games can be played with a time-limit by setting a move time when creating a new game. In timed games each
511player has a certain amount of time available for deciding which moves to make, and the time remaining
512for each player decreases only when it is their turn to move.
513</para>
514</sect2>
515
516<sect2 id="draw">
517<title>Game Draw</title>
518<para>
519A game that ends without victory for either player. Most drawn games are draws by agreement based upon the rules. The other ways that a game can end in a draw are stalemate, three-fold repetition, the fifty-move rule, and insufficient material. A position is said to be a draw (or a drawn position) if either player can, through correct play, eventually force the game into a position where the game must end in a draw, regardless of the moves made by the other player.
520</para>
521
522
523<sect3 id="stalemate">
524<title>Stalemate</title>
525<para>
526A stalemate is a position in which the player whose turn it is to move has no legal move and his king is not in check. A stalemate results in an immediate draw.
527</para>
528</sect3>
529
530<sect3 id="threefold-repetition">
531<title>Threefold repetetion</title>
532<para>
533The game is drawn if the same position occurs three times with the same player to move, and with each player having the same set of legal moves each time (the latter includes the right to take en passant and the right to castle).
534</para>
535</sect3>
536
537
538<sect3 id="fifty-move-rule">
539<title>Fifty move rule</title>
540<para>
541The fifty move rule states that the game is drawn after fifty moves from each side without a pawn move or capture.
542</para>
543</sect3>
544
545<sect3 id="insuff-material">
546<title>Insufficient material</title>
547<para>
548An endgame scenario in which all pawns have been captured, and one side has only its king remaining while the other is down to just a king or a king plus one knight or one bishop. The position is a draw because it is impossible for the dominant side to deliver checkmate regardless of play. Situations where checkmate is possible only if the inferior side blunders are covered by the fifty-move rule.
549</para>
550</sect3>
551
552
553</sect2>
554
555</sect1>
556
557
558
559
560<sect1 id="prefs">
561 <title>Game Settings</title>
562
563
564<sect2 id="game-prefs">
565 <title>Game Preferences</title>
566 <para>
567 This preference dialog allows you to modify board orientation, move format and promotion type.
568 </para>
569
570 <figure id="preferences-game-shot">
571 <title>Game preferences dialog for glChess</title>
572 <screenshot>
573 <mediaobject>
574 <imageobject>
575 <imagedata fileref="figures/preferences_game.png" format="PNG" srccredit="Andreas"/>
576 </imageobject>
577 <textobject>
578 <phrase>Game preferences dialog for glChess.</phrase>
579 </textobject>
580 </mediaobject>
581 </screenshot>
582 </figure>
583
584
585</sect2>
586
587
588
589<sect2 id="view-prefs">
590 <title>View Preferences</title>
591 <para>
592 This preference dialog allows you to modify the look and feel of glChess.
593 </para>
594
595 <figure id="preferences-view-shot">
596 <title>View preferences dialog for glChess</title>
597 <screenshot>
598 <mediaobject>
599 <imageobject>
600 <imagedata fileref="figures/preferences_view.png" format="PNG" srccredit="Andreas"/>
601 </imageobject>
602 <textobject>
603 <phrase>View preferences dialog for glChess.</phrase>
604 </textobject>
605 </mediaobject>
606 </screenshot>
607 </figure>
608
609
610</sect2>
611
612</sect1>
613
614
615<sect1 id="engines">
616 <title>Chess Engines</title>
617
618 <para>
619 glChess should be able to use any Chess Engine Communication Protocol or Universal Chess Interface compatible chess engines, including these chess engines:
620
621 </para>
622
623<!-- Please keep AI list synchronized with glchess/data/ai.xml -->
624<itemizedlist spacing="compact">
625 <listitem>
626 <para>GNUChess</para>
627 </listitem>
628 <listitem>
629 <para>Sjeng</para>
630 </listitem>
631 <listitem>
632 <para>Amy</para>
633 </listitem>
634 <listitem>
635 <para>Crafty</para>
636 </listitem>
637 <listitem>
638 <para>Faile</para>
639 </listitem>
640 <listitem>
641 <para>Phalanx</para>
642 </listitem>
643 <listitem>
644 <para>Glaurung</para>
645 </listitem>
646 <listitem>
647 <para>HoiChess</para>
648 </listitem>
649 <listitem>
650 <para>Diablo</para>
651 </listitem>
652 <listitem>
653 <para>BBChess </para>
654 </listitem>
655 <listitem>
656 <para>Fruit</para>
657 </listitem>
658 <listitem>
659 <para>Amundsen</para>
660 </listitem>
661 <listitem>
662 <para>Shredder</para>
663 </listitem>
664 <listitem>
665 <para>Toga II</para>
666 </listitem>
667 <listitem>
668 <para>Boo's Chess Engine</para>
669 </listitem>
670
671
672</itemizedlist>
673
674</sect1>
675
676
677<sect1 id="bugs">
678 <title>Known Bugs and Limitations</title>
679
680 <itemizedlist mark="opencircle">
681 <listitem>
682 <para>
683 There are no documented bugs or limitations in glChess. To find areas where you can help improve
684 glChess, please refer to the TODO file which is distributed with the game.
685 </para>
686 </listitem>
687 </itemizedlist>
688
689</sect1>
690
691<sect1 id="credits">
692 <title>Authors</title>
693 <para>
694 <application>glChess</application> was written by Robert Ancell,
695 and is now maintained in gnome-games. This documentation was originally written
696 by Andreas Røsdal, with input from several GPL sources.
697 To report a bug or make a suggestion regarding this application or
698 this manual, follow the directions in this
699 <ulink url="ghelp:user-guide?feedback-bugs" type="help">document</ulink>.
700 </para>
701
702 <!-- For translations: uncomment this:
703
704 <para>
705 Latin translation was done by ME
706 (<email>MYNAME@MYADDRESS</email>). Please send all comments and
707 suggestions regarding this translation to SOMEWHERE.
708 </para>
709
710 -->
711
712 </sect1>
713
714
715 <!-- ============= Application License ============================= -->
716
717 <sect1 id="license">
718 <title>License</title>
719 <para>
720 This program is free software; you can redistribute it and/or
721 modify it under the terms of the <citetitle>GNU General Public
722 License</citetitle> as published by the Free Software Foundation;
723 either version 2 of the License, or (at your option) any later
724 version.
725 </para>
726 <para>
727 This program is distributed in the hope that it will be useful, but
728 WITHOUT ANY WARRANTY; without even the implied warranty of
729 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
730 <citetitle>GNU General Public License</citetitle> for more details.
731 </para>
732 <para>
733 A copy of the <citetitle>GNU General Public License</citetitle> is
734 included as an appendix to the <citetitle>GNOME Users
735 Guide</citetitle>. You may also obtain a copy of the
736 <citetitle>GNU General Public License</citetitle> from the Free
737 Software Foundation by visiting <ulink type="http"
738 url="http://www.fsf.org">their Web site</ulink> or by writing to
739 <address>
740 Free Software Foundation, Inc.
741 <street>59 Temple Place</street> - Suite 330
742 <city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode>
743 <country>USA</country>
744 </address>
745 </para>
746 </sect1>
747</article>
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
0764
=== added file '.pc/90_fix-help-links.patch/glchess/help/C/index.docbook'
=== added file '.pc/90_fix-help-links.patch/glchess/help/Makefile.am'
--- .pc/90_fix-help-links.patch/glchess/help/Makefile.am 1970-01-01 00:00:00 +0000
+++ .pc/90_fix-help-links.patch/glchess/help/Makefile.am 2012-12-26 19:18:24 +0000
@@ -0,0 +1,15 @@
1@YELP_HELP_RULES@
2HELP_ID = glchess
3
4HELP_MEDIA = figures/new_game.png \
5 figures/game.png \
6 figures/preferences_game.png \
7 figures/preferences_view.png
8
9HELP_FILES = \
10 glchess.xml \
11 legal.xml
12
13HELP_LINGUAS = ca cs da de el en_GB es eu fr gl ja ko oc pt_BR ru sl sr sr@latin sv zh_CN
14
15-include $(top_srcdir)/git.mk
016
=== added directory '.pc/90_fix-help-links.patch/gnect'
=== added directory '.pc/90_fix-help-links.patch/gnect/help'
=== added directory '.pc/90_fix-help-links.patch/gnect/help/C'
=== added file '.pc/90_fix-help-links.patch/gnect/help/C/gnect.xml'
--- .pc/90_fix-help-links.patch/gnect/help/C/gnect.xml 1970-01-01 00:00:00 +0000
+++ .pc/90_fix-help-links.patch/gnect/help/C/gnect.xml 2012-12-26 19:18:24 +0000
@@ -0,0 +1,529 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
4[
5 <!ENTITY legal SYSTEM "legal.xml">
6 <!ENTITY appversion "2.12">
7 <!ENTITY manrevision "2.8">
8 <!ENTITY date "September 2004">
9 <!ENTITY app "<application>Four-in-a-Row</application>">
10 <!ENTITY appname "Four-in-a-Row">
11 <!ENTITY version "2.8">
12]>
13
14
15<!-- ===== DOCUMENT HEADER ===== -->
16
17<article id="index" lang="en">
18<!-- please do not change the id -->
19<!-- translators, change lang to the appropriate code -->
20 <articleinfo>
21 <title>&appname; Manual</title>
22 <abstract role="description">
23 <para>
24 The object of Four-in-a-Row is to place four pieces in a vertical,
25 horizontal, or diagonal row while the opponent tries to block and
26 make his/her own row of four. Four-in-a-Row can be played against
27 another human or the computer.
28 </para>
29 </abstract>
30
31 <copyright>
32 <year>2001-2002</year>
33 <holder>Timothy Musson</holder>
34 </copyright>
35
36 <!-- translators: uncomment this:
37
38 <copyright>
39 <year>2000</year>
40 <holder>ME-THE-TRANSLATOR (Latin translation)</holder>
41 </copyright>
42
43 -->
44
45 <publisher role="maintainer">
46 <publishername> GNOME Documentation Project </publishername>
47 </publisher>
48
49 &legal;
50
51 <authorgroup>
52 <author>
53 <firstname>Timothy</firstname>
54 <surname>Musson</surname>
55 <affiliation>
56 <!-- <orgname></orgname> -->
57 <address><email>trmusson@ihug.co.nz</email></address>
58 </affiliation>
59 </author>
60
61<!-- This is appropriate place for other contributors: translators,
62 maintainers, etc. Commented out by default.
63
64 <othercredit role="translator">
65 <firstname>Latin</firstname>
66 <surname>Translator 1</surname>
67 <affiliation>
68 <orgname>Latin Translation Team</orgname>
69 <address> <email>translator@gnome.org</email> </address>
70 </affiliation>
71 <contrib>Latin translation</contrib>
72 </othercredit>
73-->
74 </authorgroup>
75
76 <releaseinfo revision="2.26" role="review"/>
77
78 <revhistory>
79 <revision>
80 <revnumber>&appname; Manual V&manrevision;</revnumber>
81 <date>&date;</date>
82 <revdescription>
83 <para role="author">Timothy Musson
84 <email>trmusson@ihug.co.nz</email>
85 </para>
86 <para role="publisher"></para>
87 </revdescription>
88 </revision>
89 </revhistory>
90
91 <releaseinfo>This manual describes version &appversion; of &appname;.
92 </releaseinfo>
93
94 <legalnotice>
95 <title>Feedback</title>
96 <para>To report a bug or make a suggestion regarding the &appname;
97 application or this manual, follow the directions in the
98 <ulink url="ghelp:user-guide?feedback-bugs"
99 type="help">GNOME Feedback Page</ulink>.
100 </para>
101 </legalnotice>
102 </articleinfo>
103
104
105 <!-- ============= Document Body ============================= -->
106
107 <!-- ============= Introduction ============================== -->
108
109
110 <sect1 id="intro">
111
112 <title>Introduction</title>
113
114 <para>
115 &app; is a four-in-a-row game for the GNOME Project.
116 The object of the game is to build a line of four of your marbles
117 while trying to stop your opponent (human or computer) building a
118 line of his or her own. A line can be horizontal, vertical or
119 diagonal.
120 </para>
121
122 <para>
123 To run &app;, select
124 <guimenuitem>&appname;</guimenuitem> from the
125 <guisubmenu>Games</guisubmenu> submenu of the
126 <guimenu>Main Menu</guimenu>, or type
127 <command>gnect</command> on the command line.
128 </para>
129
130 <para>
131 &app; is included in the <filename>GNOME-games</filename> package,
132 which is part of the GNOME desktop environment. This document describes
133 version &version; of &app;.
134 </para>
135
136 <para>
137 &appname; also features multiplayer support with two
138 human players in hotseat mode.
139 </para>
140
141
142 </sect1>
143
144
145 <!-- ============= Usage ===================================== -->
146
147
148 <sect1 id="usage">
149
150 <title>Basic Usage</title>
151
152 <!-- ===== How to play ===== -->
153
154 <sect2 id="playing">
155
156 <title>Playing &appname;</title>
157
158 <para>
159 To start a new game of &appname; choose <menuchoice><guimenu>Game</guimenu><guimenuitem>New Game</guimenuitem></menuchoice>.
160 </para>
161
162 <para>
163 The <interface>game board</interface> consists of seven columns and
164 six rows. Above it, a special row indicates the current player and the marble about to be played. Each move consists of dropping a marble in one of the columns. The marble lands on the topmost empty row of the chosen column.
165 </para>
166
167 <para>To make a move, click on a column with the mouse. To play with the keyboard, move the marble in the top row with the left and right arrow keys, and drop it in place with the down arrow key. Your marble will drop into the topmost empty row of that column.
168 </para>
169
170 <!-- Figure -->
171 <mediaobject id="mainwindow-fig">
172 <imageobject>
173 <imagedata fileref="figures/mainwindow.png"
174 format="PNG"
175 srccredit="trm"/>
176 </imageobject>
177 <textobject>
178 <phrase>&appname;'s Main Window</phrase>
179 </textobject>
180 <caption><para>&appname;'s Main Window</para></caption>
181 </mediaobject>
182
183 <para>
184 The game is won when one of the two players manages to line up four
185 of his or her marbles horizontally, vertically or diagonally. If the
186 board fills up without a win, the game ends in a draw.
187 </para>
188
189 </sect2>
190
191 <!-- ===== Commands ===== -->
192
193 <sect2 id="commands">
194 <title>Commands</title>
195 <anchor id="menubar"/><!-- id for removed section -->
196
197 <para>To take back a move, choose <menuchoice>
198 <shortcut><keycombo>
199 <keysym>Ctrl</keysym><keycap>Z</keycap>
200 </keycombo></shortcut>
201 <guimenuitem>Undo move</guimenuitem>
202 </menuchoice>.
203 If you're playing against a friend, this will undo one
204 move. If you're playing against the computer, this will
205 undo the computer's last move and then yours.
206 Repeating this will return the board to its initial
207 state.
208 </para>
209 <para>Choose <menuchoice>
210 <shortcut><keycombo>
211 <keysym>Ctrl</keysym><keycap>H</keycap>
212 </keycombo></shortcut>
213 <guimenuitem>Hint</guimenuitem>
214 </menuchoice> to get a suggestion from the computer for your next move.
215 This is shown in the status bar.</para>
216
217 <para>
218 Choose <menuchoice>
219 <guimenuitem>Scores</guimenuitem>
220 </menuchoice> to show a tally of wins and draws
221 for the current playing session. The scores will be reset to
222 zero if Player Selection is changed in Preferences.
223 </para>
224
225
226 </sect2>
227
228 <!-- ===== Preferences ===== -->
229
230 <sect2 id="prefsdialog">
231
232 <title>Preferences</title>
233
234 <para>
235 To change the game's settings, select
236 <guimenuitem>Preferences</guimenuitem> from the
237 <guimenu>Settings</guimenu> menu. This opens the
238 <interface>Preferences Dialog</interface>.
239 </para>
240
241 <para>
242 Configuration options in the <guilabel>Game</guilabel>
243 tab are:
244
245 <variablelist>
246
247 <varlistentry>
248 <term>
249 <guilabel>Player One</guilabel> and
250 <guilabel>Player Two</guilabel>
251 </term>
252 <listitem>
253 <para>
254
255 These two columns tell &app; who's playing and, if it is the computer, how hard they play. To play against a friend, select
256 Human for both Player One and Player Two.
257
258 </para>
259 </listitem>
260 </varlistentry>
261
262 <varlistentry>
263 <term><guilabel>Theme</guilabel></term>
264 <listitem>
265 <para>
266 The theme menu lists available themes and lets
267 you choose your favourite.
268 </para>
269 </listitem>
270 </varlistentry>
271
272 <varlistentry>
273 <term><guilabel>Enable Animation</guilabel></term>
274 <listitem>
275 <para>
276 Here you can toggle the game's animation on or off.
277 </para>
278 </listitem>
279 </varlistentry>
280
281 </variablelist>
282 </para>
283 <para>
284 Finally there is a <guilabel>Controls</guilabel> tab to
285 change the keyboard controls. To change a control, double click the
286 appropriate entry and then press the new key.
287 </para>
288
289 </sect2>
290 </sect1>
291
292
293 <!-- ===== Custom Themes ===================================== -->
294
295
296 <sect1 id="custom">
297
298 <title>Creating New Themes</title>
299
300 <para>
301 This section's included in case you'd like to make your own themes for
302 &app;. It assumes you're familiar with basic text editing, graphics
303 software and the command line.
304 </para>
305
306 <sect2 id="images">
307
308 <title>Images</title>
309
310 <para>
311 &app;'s tile sets contain six tiles of equal size, lined up
312 horizontally. From left to right:
313 </para>
314
315 <orderedlist>
316 <listitem>
317 <para>Player One's marble as it appears on the game board</para>
318 </listitem>
319 <listitem>
320 <para>Player Two's marble as it appears on the game board</para>
321 </listitem>
322 <listitem>
323 <para>The game board's background</para>
324 </listitem>
325 <listitem>
326 <para>The top row's background</para>
327 </listitem>
328 <listitem>
329 <para>Player One's marble as it appears on the top row</para>
330 </listitem>
331 <listitem>
332 <para>Player Two's marble as it appears on the top row</para>
333 </listitem>
334 </orderedlist>
335
336 <figure id="shot1">
337 <title>An example tile set</title>
338 <screenshot>
339 <screeninfo>This image shows the six tiles in a tile set</screeninfo>
340 <graphic format="PNG" fileref="figures/tileset.png" srccredit="TRM"></graphic>
341 </screenshot>
342 </figure>
343
344 <para>
345 Tiles three and four will be repeated over the game board and
346 top row unless a full window background image is specified in the
347 theme file.
348 </para>
349
350 <tip>
351 <title>TIP</title>
352 <para>
353 PNG format is recommended for tile sets. The first, second, fifth
354 and sixth tiles should contain some transparency if you want the
355 background to show through. The third and fourth tiles should be
356 solid, with no transparency, even if you'll be using a full
357 window background image with your theme.
358 </para>
359 </tip>
360
361 <tip>
362 <title>TIP</title>
363 <para>
364 Tiles can be square or rectangular, and any size you like. Most
365 of the tile sets that come with &app; use square tiles measuring
366 50 pixels by 50 pixels.
367 </para>
368 </tip>
369
370 <para>
371 For a full window background image, there's a bit more work to do.
372 Let's say your tiles measure 50 by 50 pixels each. The game's display
373 measures 7 by 7 tiles, including the top row, so the ideal background
374 image for your tile set measures 350 by 350 pixels.
375 </para>
376
377 <tip>
378 <title>TIP</title>
379 <para>
380 &app; will automatically scale the background image if it doesn't
381 match the tile set. This means you can make "large" and "small"
382 versions of your theme, both using the same background image,
383 just by having a large and a small version of your tile set.
384 </para>
385 </tip>
386
387 <para>
388 So, you now have a tile set and perhaps a background image to
389 go with it. The next step is to put them in the right place.
390 </para>
391
392 </sect2>
393
394
395 <sect2 id="directories">
396
397 <title>Putting It Together</title>
398
399 <para>
400 The last step is to put your image(s) where &app; can
401 find them. You could put them in Four-in-a-row's install directory (which will
402 depend on your particular system), but your home directory's probably
403 a better idea.
404 </para>
405
406 <para>
407 Make a <filename class="directory">~/.gnect</filename> directory,
408 and a <filename class="directory">~/.gnect/pixmaps</filename>
409 directory. Those names are important, as &app; won't look
410 anywhere else.
411 </para>
412
413 <para>
414 Copy your image(s) into the pixmaps directory.
415 </para>
416
417 <para>
418 If you start &app; from the command line, it'll give you clues about
419 any problems it has with your new theme. If it has none, you'll
420 find your new theme listed the
421 <interface>Preferences Dialog</interface>.
422 </para>
423
424 <para>Have fun!</para>
425
426 </sect2>
427
428
429 </sect1>
430
431
432 <!-- ===== Bugs ============================================== -->
433
434
435 <sect1 id="bugs">
436
437 <title>Known Bugs and Limitations</title>
438
439 <para>
440 Occasionally a marble-dropping animation doesn't look as smooth
441 as it should.
442 </para>
443
444 </sect1>
445
446
447 <!-- ===== Authors =========================================== -->
448
449
450 <sect1 id="authors">
451
452 <title>Authors</title>
453
454 <para>
455 &app; was written by Timothy Musson (<email>trmusson@ihug.co.nz</email>)
456 and David Neary (<email>bolsh@gimp.org</email>). Various others
457 have taken the time to help in many ways since work on &app; began.
458 </para>
459 <para>
460 The <ulink type="http"
461 url="http://www.ce.unipr.it/~gbe/velena.html">Velena Engine</ulink>,
462 &app;'s main computer player, was written by Giuliano Bertoletti.
463 We're grateful to him for allowing us to include his work, without
464 which &app; wouldn't be nearly as worthwhile.
465 </para>
466 <para>
467 This manual was written by Timothy Musson.
468 </para>
469 <para>
470 To report a bug or make a suggestion regarding this application or
471 this manual, follow the directions in this
472 <ulink url="ghelp:user-guide?feedback-bugs" type="help">document</ulink>.
473 </para>
474
475
476<!-- For translations: uncomment this:
477
478 <para>
479 Latin translation was done by ME
480 (<email>MYNAME@MYADDRESS</email>). Please send all comments and
481 suggestions regarding this translation to SOMEWHERE.
482 </para>
483
484-->
485
486 </sect1>
487
488
489 <!-- ============= License =================================== -->
490
491
492 <sect1 id="license">
493
494 <title>License</title>
495
496 <para>
497 This program is free software; you can redistribute it and/or
498 modify it under the terms of the <citetitle>GNU General Public
499 License</citetitle> as published by the Free Software Foundation;
500 either version 2 of the License, or (at your option) any later
501 version.
502 </para>
503
504 <para>
505 This program is distributed in the hope that it will be useful, but
506 WITHOUT ANY WARRANTY; without even the implied warranty of
507 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
508 <citetitle>GNU General Public License</citetitle> for more details.
509 </para>
510
511 <para>
512 A copy of the <citetitle>GNU General Public License</citetitle> is
513 included as an appendix to the <citetitle>GNOME Users
514 Guide</citetitle>. You may also obtain a copy of the
515 <citetitle>GNU General Public License</citetitle> from the Free
516 Software Foundation by visiting
517 <ulink url="http://www.fsf.org" type="http">their Web site</ulink> or
518 by writing to
519 <address>
520 Free Software Foundation, Inc.
521 <street>59 Temple Place</street> - Suite 330
522 <city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode>
523 <country>USA</country>
524 </address>
525 </para>
526
527 </sect1>
528
529</article>
0530
=== added file '.pc/90_fix-help-links.patch/gnect/help/C/index.docbook'
=== added file '.pc/90_fix-help-links.patch/gnect/help/Makefile.am'
--- .pc/90_fix-help-links.patch/gnect/help/Makefile.am 1970-01-01 00:00:00 +0000
+++ .pc/90_fix-help-links.patch/gnect/help/Makefile.am 2012-12-26 19:18:24 +0000
@@ -0,0 +1,16 @@
1@YELP_HELP_RULES@
2HELP_ID = gnect
3
4HELP_MEDIA = \
5 figures/mainwindow.png \
6 figures/tileset.png \
7 figures/connect.png \
8 figures/tables.png
9
10HELP_FILES = \
11 gnect.xml \
12 legal.xml
13
14HELP_LINGUAS = ca cs da de el en_GB es eu fi fr it oc sl sr sr@latin sv zh_CN
15
16-include $(top_srcdir)/git.mk
017
=== added directory '.pc/90_fix-help-links.patch/gnibbles'
=== added directory '.pc/90_fix-help-links.patch/gnibbles/help'
=== added directory '.pc/90_fix-help-links.patch/gnibbles/help/C'
=== added file '.pc/90_fix-help-links.patch/gnibbles/help/C/gnibbles.xml'
--- .pc/90_fix-help-links.patch/gnibbles/help/C/gnibbles.xml 1970-01-01 00:00:00 +0000
+++ .pc/90_fix-help-links.patch/gnibbles/help/C/gnibbles.xml 2012-12-26 19:18:24 +0000
@@ -0,0 +1,592 @@
1<?xml version="1.0"?>
2<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
4 <!ENTITY legal SYSTEM "legal.xml">
5 <!ENTITY appversion "2.20">
6 <!ENTITY manrevision "2.20">
7 <!ENTITY date "May 2007">
8 <!ENTITY app "<application>Nibbles</application>">
9 <!ENTITY appname "Nibbles">
10 <!ENTITY VERSION "2.20">
11]>
12
13<!--
14 (Do not remove this comment block.)
15 Maintained by the GNOME Documentation Project
16 http://developer.gnome.org/projects/gdp
17 Template version: 2.0 beta
18 Template last modified Feb 12, 2002
19-->
20
21<!-- =============Document Header ============================= -->
22
23<article id="index" lang="en">
24<!-- please do not change the id; for translations, change lang to -->
25<!-- appropriate code -->
26 <articleinfo>
27 <title>&app; Manual</title>
28
29 <abstract role="description">
30 <para>
31 Nibbles is a worm game for GNOME. The player controls a 2D
32 worm while trying to get food. Getting food gives points,
33 but hitting anything causes a loss of points. When all points
34 are lost, the player loses.
35 </para>
36 </abstract>
37
38 <copyright>
39 <year>2000</year>
40 <holder>Kevin Breit</holder>
41 </copyright>
42
43 <!-- translators: uncomment this:
44
45 <copyright>
46 <year>2000</year>
47 <holder>ME-THE-TRANSLATOR (Latin translation)</holder>
48 </copyright>
49
50 -->
51
52<!-- An address can be added to the publisher information. If a role is
53 not specified, the publisher/author is the same for all versions of the
54 document. -->
55 <publisher>
56 <publishername> GNOME Documentation Project </publishername>
57 </publisher>
58
59 &legal;
60 <!-- This file contains link to license for the documentation (GNU FDL), and
61 other legal stuff such as "NO WARRANTY" statement. Please do not change
62 any of this. -->
63
64 <authorgroup>
65 <author role="maintainer">
66 <firstname>Kevin</firstname>
67 <surname>Breit</surname>
68 <affiliation>
69 <orgname>GNOME Documentation Project</orgname>
70 <address> <email>battery841@mypad.com</email> </address>
71 </affiliation>
72 </author>
73<!-- This is appropriate place for other contributors: translators,
74 maintainers, etc. Commented out by default.
75 <othercredit role="translator">
76 <firstname>Latin</firstname>
77 <surname>Translator 1</surname>
78 <affiliation>
79 <orgname>Latin Translation Team</orgname>
80 <address> <email>translator@gnome.org</email> </address>
81 </affiliation>
82 <contrib>Latin translation</contrib>
83 </othercredit>
84-->
85 </authorgroup>
86
87 <releaseinfo revision="2.26" role="review"/>
88
89 <revhistory>
90 <revision>
91 <revnumber>&appname; Manual V&manrevision;</revnumber>
92 <date>&date;</date>
93 <revdescription>
94 <para role="author">Kevin Breit
95 <email>battery841@mypad.com</email>
96 </para>
97 <para role="publisher">GNOME Documentation Project</para>
98 </revdescription>
99 </revision>
100 </revhistory>
101
102 <releaseinfo>This manual describes version &appversion; of &appname;.
103 </releaseinfo>
104 <!-- The following feedback information only applies to appliactions
105 listed in bugzilla.gnome.org and bugzilla.ximian.com. For other
106 applications, please provide your own feedback info or remove thsi
107 section altogether -->
108 <legalnotice>
109 <title>Feedback</title>
110 <para>To report a bug or make a suggestion regarding the &app; application or
111 this manual, follow the directions in the
112 <ulink url="ghelp:user-guide?feedback-bugs"
113 type="help">GNOME Feedback Page</ulink>.
114 </para>
115<!-- Translators may also add here feedback address for translations -->
116 </legalnotice>
117 </articleinfo>
118
119 <indexterm zone="index">
120 <primary>Nibbles</primary>
121 </indexterm>
122
123 <!-- ============= Document Body ============================= -->
124
125 <!-- ============= Introduction ============================== -->
126 <sect1 id="intro">
127 <title>Introduction</title>
128
129 <para>
130 <application>Nibbles</application> is a game where the user controls a worm. The worm moves around the board, eating diamonds while avoiding the walls placed around it.
131 </para>
132
133 <para>
134 To run <application>Nibbles</application>, select
135 <menuchoice>
136 <guisubmenu>Games</guisubmenu>
137 <guimenuitem>Nibbles</guimenuitem>
138 </menuchoice>
139 from the <guimenu>Applications</guimenu> menu, or type
140 <command>gnibbles</command> on the command line.
141 </para>
142
143 <para>
144 <application>Nibbles</application> is included in the
145 <filename>gnome-games</filename> package, which is part of the
146 GNOME desktop environment. This document describes version
147 &VERSION; of <application>Nibbles</application>.
148 </para>
149 </sect1>
150
151 <sect1 id="objective">
152 <title>Nibbles Objective</title>
153 <para>
154 The objective of Nibbles is quite simple. You control the worm and
155 if the worm runs into a wall or runs into itself, you die. You get ten
156 lives before your game is over. You win by either beating your own high
157 score (or a friend's) or by completing all the levels. It is also
158 possible to play against worms with artificial intelligence.
159 </para>
160 <para>
161 &appname; also features multiplayer support with up to six competing
162 human players in hotseat mode.
163 </para>
164 </sect1>
165
166 <!-- ================ Usage ================================ -->
167 <!-- This section should describe basic usage of the application. -->
168
169 <sect1 id="usage">
170 <title>Using Nibbles</title>
171 <para>
172 <application>Nibbles</application> is a simple game to play. The only keys
173 that are needed are the arrow keys.
174 </para>
175
176 <!-- ========= Basic Usage =========================== -->
177<sect2 id="mainwin">
178<title>Basic usage</title>
179<para>
180Starting <application>Nibbles</application> opens
181the <interface>main window</interface> shown below.
182<figure id="intro-fig">
183<title>Nibbles Introduction Window</title>
184<screenshot>
185 <mediaobject>
186 <imageobject>
187<imagedata fileref="figures/intro.png" format="PNG"/>
188 </imageobject>
189 <textobject>
190 <phrase>Nibbles Introduction Window.</phrase>
191 </textobject>
192 </mediaobject>
193</screenshot>
194</figure>
195</para>
196<para>
197To start the game, select <menuchoice><guimenu>Game</guimenu>
198<guimenuitem>New Game</guimenuitem></menuchoice>.
199</para>
200<para>
201When the game starts, the worm will come out of the left side of the
202screen. You use the up arrow to make the direction of the worm go up.
203Use the right arrow to turn the worm right, left arrow to turn the worm
204left, and down arrow to turn the worm down.
205<figure id="gameplay">
206<title>Nibbles During Gameplay</title>
207<screenshot>
208 <mediaobject>
209 <imageobject>
210 <imagedata fileref="figures/playing.png" format="PNG"/>
211 </imageobject>
212 <textobject>
213 <phrase>Nibbles During Gameplay.</phrase>
214 </textobject>
215 </mediaobject>
216</screenshot>
217</figure>
218</para>
219</sect2>
220
221<!-- This section should also describe main elements of graphic user
222interface, such as menus and buttons, unless this description
223is too long - in that case, it should be moved to a separate
224section. For example -->
225
226
227<!-- ========= Menus =========================== -->
228<sect2 id="menubar">
229 <title>Menus</title>
230 <para>
231 The menu bar, located at the top of the <interface>Main
232 Window</interface>, contains the following menus:
233 </para>
234
235 <variablelist>
236 <varlistentry>
237 <term><guimenu>Game</guimenu></term>
238 <listitem>
239 <para>
240 This menu contains:
241 <itemizedlist>
242 <listitem>
243 <para>
244 <menuchoice>
245 <shortcut>
246 <keysym>Ctrl+N</keysym>
247 </shortcut>
248 <guimenuitem>New Game</guimenuitem>
249 </menuchoice>
250 This starts a new game of <application>Nibbles</application>.
251 </para>
252 </listitem>
253 <listitem>
254 <para>
255 <menuchoice>
256 <guimenuitem>Scores</guimenuitem>
257 </menuchoice>
258 This shows the high scores.
259 </para>
260 </listitem>
261 <listitem>
262 <para>
263 <menuchoice>
264 <guimenuitem>Pause game</guimenuitem>
265 </menuchoice>
266 This will pause your game. Click on the <quote>Pause Game
267 </quote> menu option to resume game.
268 </para>
269 </listitem>
270 <listitem>
271 <para>
272 <menuchoice>
273 <guimenuitem>End Game</guimenuitem>
274 </menuchoice>
275 End the current game and return to the title screen.
276 </para>
277 </listitem>
278 <listitem>
279 <para>
280 <menuchoice>
281 <shortcut>
282 <keysym>Ctrl-Q</keysym>
283 </shortcut>
284 <guimenuitem>Exit</guimenuitem>
285 </menuchoice>
286 This quits the application.
287 </para>
288 </listitem>
289 </itemizedlist>
290 </para>
291 </listitem>
292 </varlistentry>
293
294 <varlistentry>
295 <term><guimenu>View</guimenu></term>
296 <listitem>
297 <para>
298 This menu contains:
299 <itemizedlist>
300 <listitem>
301 <para>
302 <menuchoice>
303 <guimenuitem>Fullscreen</guimenuitem>
304 </menuchoice>
305 This toggles your game window to be fullscreen.
306 </para>
307 </listitem>
308 </itemizedlist>
309 </para>
310 </listitem>
311 </varlistentry>
312
313 <varlistentry>
314 <term><guimenu>Settings</guimenu></term>
315 <listitem>
316 <para>
317 This menu contains:
318 <itemizedlist>
319 <listitem>
320 <para>
321 <menuchoice>
322 <guimenuitem>Preferences</guimenuitem>
323 </menuchoice>
324 This opens your window to edit <link linkend="prefs">
325 preferences.</link>
326 </para>
327 </listitem>
328 </itemizedlist>
329 </para>
330 </listitem>
331 </varlistentry>
332
333 <varlistentry>
334 <term><guimenu>Help</guimenu></term>
335 <listitem>
336 <para>
337 This menu contains:
338 <itemizedlist>
339 <listitem>
340 <para>
341 <menuchoice>
342 <shortcut>
343 <keysym>F1</keysym>
344 </shortcut>
345 <guimenuitem>Contents</guimenuitem>
346 </menuchoice>
347 Display this manual.
348 </para>
349 <para>
350 <guimenuitem>About</guimenuitem> This opens the
351 <interface>About</interface> dialog which shows
352 basic information about
353 <application>Nibbles</application>, such as
354 the author's name, the version number of the game.
355 </para>
356 </listitem>
357 </itemizedlist>
358 </para>
359 </listitem>
360 </varlistentry>
361 </variablelist>
362 </sect2>
363 <sect2 id="diamonds">
364 <title>Diamonds</title>
365 <para>
366 <application>Nibbles</application> has numerous different
367 diamonds to eat. They are each a different color and serve
368 a different function. Only the pale purple diamond is guaranteed
369 to be around long enough for you to eat it (in fact, you have to
370 eat them to finish the level). The other diamonds are all bonuses,
371 but they only stick around for a short time. We'll leave it up to
372 you to discover just what the bonus each colour gives, but they
373 all affect either the score, the length of the worm, or both. Be careful
374 when going for these bonus diamonds, don't cut yourself off from
375 the ordinary diamonds that you need to finish the level.
376 </para>
377 </sect2>
378 </sect1>
379
380
381 <!-- ============= Customization ============================= -->
382 <sect1 id="prefs">
383 <title>Customization</title>
384 <para>
385 To change the application settings, select
386 <menuchoice>
387 <guimenu>Settings</guimenu>
388 <guimenuitem>Preferences</guimenuitem>
389 </menuchoice>. This opens the
390 <interface>Preferences</interface> dialog. All preferences are
391 automatically saved and applied as you change them.
392 </para>
393
394 <figure id="game-prefs">
395 <title>Game Preferences Tab</title>
396 <screenshot>
397 <mediaobject>
398 <imageobject>
399 <imagedata fileref="figures/game.png" format="PNG" srccredit="Kevin Breit"/>
400 </imageobject>
401 <textobject>
402 <phrase>Game Preferences Tab.</phrase>
403 </textobject>
404 </mediaobject>
405 </screenshot>
406 </figure>
407
408 <para>
409 The properties in the <guilabel>Game</guilabel> tab are:
410 <variablelist>
411 <varlistentry>
412 <term>Speed</term>
413 <listitem>
414 <para>
415 This controls the speed of the worm.
416 </para>
417 </listitem>
418 </varlistentry>
419 <varlistentry>
420 <term>Play levels in random order</term>
421 <listitem>
422 <para>
423 Selecting this causes the level
424 advancement to happen in random order.
425 </para>
426 </listitem>
427 </varlistentry>
428 <varlistentry>
429 <term>Enable fake bonuses</term>
430 <listitem>
431 <para>
432 When enabled, this allows for two blue diamonds on
433 the screen at a time. One diamond makes you shrink instead of grow when
434 eaten.
435 </para>
436 </listitem>
437 </varlistentry>
438 <varlistentry>
439 <term>Enable sounds</term>
440 <listitem>
441 <para>
442 Controls the use of sound in the game.
443 </para>
444 </listitem>
445 </varlistentry>
446 <varlistentry>
447 <term>Starting level</term>
448 <listitem>
449 <para>
450 Which level to start with. Use this if you want to jump
451 immediately to a challenging level.
452 </para>
453 </listitem>
454 </varlistentry>
455 <varlistentry>
456 <term>Number of human players</term>
457 <listitem>
458 <para>
459 There is room for up to six players.
460 </para>
461 </listitem>
462 </varlistentry>
463 <varlistentry>
464 <term>Number of AI players</term>
465 <listitem>
466 <para>
467 There is room for up to six AI players. Note that the total
468 number of human and AI players must be less than or equal to six.
469 </para>
470 </listitem>
471 </varlistentry>
472 </variablelist>
473 </para>
474 <para>
475
476 <figure id="worm-prefs">
477 <title>Worm Preferences Tab</title>
478 <screenshot>
479 <mediaobject>
480 <imageobject>
481 <imagedata fileref="figures/worm_op.png" format="PNG" srccredit="Kevin Breit"/>
482 </imageobject>
483 <textobject>
484 <phrase>Worm Preferences Tab.</phrase>
485 </textobject>
486 </mediaobject>
487 </screenshot>
488 </figure>
489
490 The properties in the <guilabel>Worm 1 </guilabel>through <guilabel> Worm
4916</guilabel> tabs let you set individual preferences for the different worms.
492
493 <variablelist>
494 <varlistentry>
495 <term>Keyboard controls</term>
496 <listitem>
497 <para>
498 This list let you change the keyboard controls for the given
499 worm. To change a control, double click on the appropriate entry and
500 then press the key you want to use for that control.
501 </para>
502 </listitem>
503 </varlistentry>
504 <varlistentry>
505 <term>Use relative motion</term>
506 <listitem>
507 <para>
508 Rather than left sending your worm toward the left of the screen,
509 right toward the right and so on, the left and right keys make
510 the worm perform a left or right turn. For example, if the worm
511 is moving to the left and you press the left control it turns to
512 head toward the bottom of the screen.
513 </para>
514 </listitem>
515 </varlistentry>
516 <varlistentry>
517 <term>Worm color</term>
518 <listitem>
519 <para>
520 Customize the color of your worm so you can tell it from your
521 opponent's worm in multi-player mode.
522 </para>
523 </listitem>
524 </varlistentry>
525 </variablelist>
526
527 </para>
528
529 </sect1>
530
531<!-- ============= Authors ================================ -->
532
533 <sect1 id="authors">
534 <title>Authors</title>
535 <para>
536 <application>Nibbles</application> was written by Sean MacIsaac
537 <email>sjm@acm.org</email> and Ian Peters <email>itp@gnu.org</email>.
538 This manual was written by Kevin Breit <email>battery841@mypad.com</email>.
539 Nibbles was updated with network support by Andreas Røsdal <email>andreasr@gnome.org</email>.
540 To report a bug or make a suggestion regarding this application or
541 this manual, follow the directions in this
542 <ulink url="ghelp:user-guide?feedback-bugs" type="help">document</ulink>.
543 </para>
544
545 <!-- For translations: uncomment this:
546
547 <para>
548 Latin translation was done by ME
549 (<email>MYNAME@MYADDRESS</email>). Please send all comments and
550 suggestions regarding this translation to SOMEWHERE.
551 </para>
552
553 -->
554
555 </sect1>
556
557
558 <!-- ============= Application License ============================= -->
559
560 <sect1 id="license">
561 <title>License</title>
562 <para>
563 This program is free software; you can redistribute it and/or
564 modify it under the terms of the <ulink type="help" url="gnome-help:gpl">
565 <citetitle>GNU General Public
566 License</citetitle></ulink> as published by the Free Software Foundation;
567 either version 2 of the License, or (at your option) any later
568 version.
569 </para>
570 <para>
571 This program is distributed in the hope that it will be useful, but
572 WITHOUT ANY WARRANTY; without even the implied warranty of
573 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
574 <citetitle>GNU General Public License</citetitle> for more details.
575 </para>
576 <para>
577 A copy of the <citetitle>GNU General Public License</citetitle> is
578 included as an appendix to the <citetitle>GNOME Users
579 Guide</citetitle>. You may also obtain a copy of the
580 <citetitle>GNU General Public License</citetitle> from the Free
581 Software Foundation by visiting <ulink type="http"
582 url="http://www.fsf.org">their Web site</ulink> or by writing to
583 <address>
584 Free Software Foundation, Inc.
585 59 Temple Place - Suite 330
586 Boston, MA 02111-1307
587 USA
588 </address>
589 </para>
590 </sect1>
591</article>
592
0593
=== added file '.pc/90_fix-help-links.patch/gnibbles/help/C/index.docbook'
=== added file '.pc/90_fix-help-links.patch/gnibbles/help/Makefile.am'
--- .pc/90_fix-help-links.patch/gnibbles/help/Makefile.am 1970-01-01 00:00:00 +0000
+++ .pc/90_fix-help-links.patch/gnibbles/help/Makefile.am 2012-12-26 19:18:24 +0000
@@ -0,0 +1,18 @@
1@YELP_HELP_RULES@
2HELP_ID = gnibbles
3
4HELP_MEDIA = \
5 figures/game.png \
6 figures/intro.png \
7 figures/playing.png \
8 figures/connect.png \
9 figures/tables.png \
10 figures/worm_op.png
11
12HELP_FILES = \
13 gnibbles.xml \
14 legal.xml
15
16HELP_LINGUAS = ca cs de el en_GB es eu fr it oc sl sr sr@latin sv zh_CN
17
18-include $(top_srcdir)/git.mk
019
=== added directory '.pc/90_fix-help-links.patch/gnobots2'
=== added directory '.pc/90_fix-help-links.patch/gnobots2/help'
=== added directory '.pc/90_fix-help-links.patch/gnobots2/help/C'
=== added file '.pc/90_fix-help-links.patch/gnobots2/help/C/gnobots2.xml'
--- .pc/90_fix-help-links.patch/gnobots2/help/C/gnobots2.xml 1970-01-01 00:00:00 +0000
+++ .pc/90_fix-help-links.patch/gnobots2/help/C/gnobots2.xml 2012-12-26 19:18:24 +0000
@@ -0,0 +1,666 @@
1<?xml version="1.0"?>
2<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
4 <!ENTITY legal SYSTEM "legal.xml">
5 <!ENTITY appversion "2.18">
6 <!ENTITY manrevision "2.9">
7 <!ENTITY date "August 2007">
8 <!ENTITY app "<application>Robots</application>">
9 <!ENTITY appname "Robots">
10]>
11
12<!--
13 (Do not remove this comment block.)
14 Maintained by the GNOME Documentation Project
15 http://developer.gnome.org/projects/gdp
16 Template version: 2.0 beta
17 Template last modified Feb 12, 2002
18-->
19
20<!-- =============Document Header ============================= -->
21
22<article id="index" lang="en">
23<!-- please do not change the id; for translations, change lang to -->
24<!-- appropriate code -->
25 <articleinfo>
26 <title>&app; Manual</title>
27
28 <abstract role="description">
29 <para>
30 Robots is a graphical version of the original text based
31 robots game, which can be found on a number of UNIX systems.
32 The player must outwit the robots chasing him/her by getting
33 them to run into each other.
34 </para>
35 </abstract>
36
37 <copyright>
38 <year>2001</year>
39 <holder>Patanjali Somayaji, Mark Rae</holder>
40 </copyright>
41
42 <!-- translators: uncomment this:
43
44 <copyright>
45 <year>2000</year>
46 <holder>ME-THE-TRANSLATOR (Latin translation)</holder>
47 </copyright>
48
49 -->
50
51<!-- An address can be added to the publisher information. If a role is
52 not specified, the publisher/author is the same for all versions of the
53 document. -->
54 <publisher>
55 <publishername> GNOME Documentation Project </publishername>
56 </publisher>
57
58 &legal;
59 <!-- This file contains link to license for the documentation (GNU FDL), and
60 other legal stuff such as "NO WARRANTY" statement. Please do not change
61 any of this. -->
62
63 <authorgroup>
64 <author role="maintainer">
65 <firstname>Patanjali</firstname>
66 <surname>Somayaji</surname>
67 <affiliation>
68 <address> <email>patanjali@mindless.com</email> </address>
69 </affiliation>
70 </author>
71 <author>
72 <firstname>Mark</firstname>
73 <surname>Rae</surname>
74 <affiliation>
75 <address> <email>m.rae@inpharmatica.co.uk</email> </address>
76 </affiliation>
77 </author>
78<!-- This is appropriate place for other contributors: translators,
79 maintainers, etc. Commented out by default.
80 <othercredit role="translator">
81 <firstname>Latin</firstname>
82 <surname>Translator 1</surname>
83 <affiliation>
84 <orgname>Latin Translation Team</orgname>
85 <address> <email>translator@gnome.org</email> </address>
86 </affiliation>
87 <contrib>Latin translation</contrib>
88 </othercredit>
89-->
90 </authorgroup>
91
92 <releaseinfo revision="2.26" role="review"/>
93
94 <revhistory>
95 <revision>
96 <revnumber>&appname; Manual V2.8</revnumber>
97 <date>September 2004</date>
98 <revdescription>
99 <para role="author">Patanjali Somayaji
100 <email>patanjali@mindless.com</email>
101 </para>
102 <para role="author">Mark Rae
103 <email>m.rae@inpharmatica.co.uk</email>
104 </para>
105 <para role="publisher">GNOME Documentation Project</para>
106 </revdescription>
107 </revision>
108 <revision>
109 <revnumber>&appname; Manual V&manrevision;</revnumber>
110 <date>&date;</date>
111 <revdescription>
112 <para role="author">Claude Paroz
113 <email>claude@2xlibre.net</email>
114 </para>
115 <para role="publisher">GNOME Documentation Project</para>
116 </revdescription>
117 </revision>
118 </revhistory>
119
120 <releaseinfo>This manual describes version &appversion; of &appname;.
121 </releaseinfo>
122 <!-- The following feedback information only applies to appliactions
123 listed in bugzilla.gnome.org and bugzilla.ximian.com. For other
124 applications, please provide your own feedback info or remove thsi
125 section altogether -->
126 <legalnotice>
127 <title>Feedback</title>
128 <para>To report a bug or make a suggestion regarding the &app; application or
129 this manual, follow the directions in the
130 <ulink url="ghelp:user-guide?feedback-bugs"
131 type="help">GNOME Feedback Page</ulink>.
132 </para>
133<!-- Translators may also add here feedback address for translations -->
134 </legalnotice>
135
136 </articleinfo>
137
138 <indexterm zone="index">
139 <primary>GNOME Robots</primary>
140 </indexterm>
141
142 <!-- ============= Document Body ============================= -->
143
144 <!-- ============= Introduction ============================== -->
145 <sect1 id="intro">
146 <title>Introduction</title>
147
148 <para>
149 <application>GNOME Robots</application> is a game where you try
150 and avoid a band of marauding robots which are,
151 for no adequately explained reason, trying to kill you. It is
152 based on the text-based robots game which can be found
153 on a number of UNIX systems.
154 </para>
155 <para>
156 This new version includes two types of robots, movable
157 junkheaps, multiple game configurations, user definable
158 keyboard layouts, and sound, as well as all of the features
159 which were present in the original GNOME Robots game.
160 </para>
161
162 <para>
163 To run <application>GNOME Robots</application>, select
164 <menuchoice>
165 <guisubmenu>Games</guisubmenu>
166 <guimenuitem>Robots</guimenuitem>
167 </menuchoice>
168 from the <guimenu>Main Menu</guimenu>, or type
169 <command>gnobots2</command> on the command line.
170 </para>
171
172 <para>
173 <application>GNOME Robots</application> is included in the
174 <filename>gnome-games</filename> package, which is part of the
175 GNOME desktop environment. This document describes version
176 &appversion; of <application>GNOME Robots</application>.
177 </para>
178 </sect1>
179
180 <sect1 id="objective">
181 <title>GNOME Robots Objective</title>
182 <para>
183 The objective of GNOME Robots is quite simple. You are surrounded by a
184 number of robots or other hostile adversaries. As you move about
185 they will move directly towards you for every move that you make.
186 Their goal is to kill you. Your goal is to kill all the robots on the
187 board by taking advantage of their vulnerabilities.
188 </para>
189
190 <para>
191 Robots are destroyed when they collide with each other, or when they
192 collide with the debris of some previous collision. You die if a robot
193 ends up right next to you.
194 </para>
195
196 <para> In some of the game configurations (you can choose from
197 five different sets of rules), you can push the
198 junkheaps around to form barricades to protect you. Also, if you
199 are daring enough, you can Splat! the robots by pushing
200 junkheaps on top of them for an additional bonus. </para>
201 <para>
202 You can also save yourself by teleporting yourself to a random location.
203 Unfortunately, randomly teleporting means that
204 you might end up being right next to a robot, so they can kill you when
205 they make their move. Luckily, there are also
206 safe teleports which will place you out of immediate danger, but
207 there are only a limited supply of them. You can earn
208 more free teleports as you go along (how you gain them depends on the
209 chosen game), but typically you get one for each robot that is
210 destroyed while you are 'waiting', up to a maximum of 10. If you don't
211 want to waste your saved-up safe teleports, you can choose to teleport
212 randomly if you think it's safe enough.
213 </para>
214
215 <para>
216 If you press the <guibutton>Wait</guibutton> button (see below) you will no longer be able to
217 move until either all of the robots (which still move towards you) are
218 gone, or you are killed. Doing this is risky, but may earn you extra
219 safe teleports.
220 </para>
221
222 <para> If you manage to reach the point where more than half of
223 the screen is occupied by robots, the number of robots will be
224 reset to the starting amount, allowing you to continue.
225 </para>
226 </sect1>
227
228
229 <!-- ================ Usage ================================ -->
230 <!-- This section should describe basic usage of the application. -->
231
232 <sect1 id="usage">
233 <title>Using GNOME Robots</title>
234 <para>
235 <application>GNOME Robots</application> is extremely simple to play.
236 You can use either the mouse or the keyboard.
237 This section describes basic usage of
238 <application>GNOME Robots</application>.
239 </para>
240
241 <!-- ========= Basic Usage =========================== -->
242 <sect2 id="mainwin">
243 <title>Basic usage</title>
244 <para>
245 Starting <application>GNOME Robots</application> opens the
246 <interface>Main window</interface>, shown in <xref
247 linkend="mainwindow-fig"/>.
248
249 <!-- ==== Figure ==== -->
250 <figure id="mainwindow-fig">
251 <title>GNOME Robots Main Window</title>
252 <screenshot>
253 <mediaobject>
254 <imageobject>
255 <imagedata fileref="figures/gnobots2-main.png" format="PNG" srccredit="Patanjali"/>
256 </imageobject>
257 <textobject>
258 <phrase>GNOME Robots Main Window.</phrase>
259 </textobject>
260 </mediaobject>
261 </screenshot>
262 </figure>
263 <!-- ==== End of Figure ==== -->
264 </para>
265
266 <para>
267 To start a new game, choose <guimenuitem>New</guimenuitem> in the
268 <guimenu>Game</guimenu> menu or click on the <guibutton>New</guibutton> button
269 on the toolbar.
270 </para>
271
272 <para>
273 To move, either click in the direction you want to move (the
274 cursor will show you which way you will go) or press the
275 appropriate key on the keyboard (keypad by default). Clicking on the little man
276 will keep you still. To teleport (safely or unsafely), and to
277 wait, use the buttons on the toolbar or use the items in the
278 <guimenu>Move</guimenu> menu.
279 </para>
280 </sect2>
281 </sect1>
282
283
284
285 <!-- ========= Menus =========================== -->
286
287 <sect1 id="menubar">
288 <title>Menus</title>
289 <para>
290 The menu bar, located at the top of the <interface>game
291 board</interface>, contains the following menus:
292 </para>
293
294
295 <variablelist>
296 <varlistentry>
297 <term><guimenu>Game</guimenu></term>
298 <listitem>
299 <para>
300 This menu contains three items:
301 <itemizedlist>
302 <listitem>
303 <para>
304 <menuchoice>
305 <shortcut><keysym>Ctrl-N</keysym></shortcut>
306 <guimenuitem>New</guimenuitem>
307 </menuchoice> — starts a new game of GNOME Robots.
308
309 </para>
310 </listitem>
311
312 <listitem>
313 <para>
314 <menuchoice>
315 <guimenuitem>Scores</guimenuitem>
316 </menuchoice> — shows the higher scores.
317 </para>
318 </listitem>
319
320 <listitem>
321 <para>
322 <menuchoice>
323 <shortcut><keysym>Ctrl-Q</keysym></shortcut>
324 <guimenuitem>Quit</guimenuitem>
325 </menuchoice>
326 </para>
327 </listitem>
328 </itemizedlist>
329 </para>
330 </listitem>
331 </varlistentry>
332
333 <varlistentry>
334 <term><guimenu>Move</guimenu></term>
335 <listitem>
336 <para>
337 This menu contains:
338 <itemizedlist>
339 <listitem>
340 <para>
341 <guimenuitem>Teleport</guimenuitem>—
342 teleports you in a safe location.
343 </para>
344 </listitem>
345 <listitem>
346 <para>
347 <guimenuitem>Random</guimenuitem>— teleports you in
348 a random location.
349 </para>
350 </listitem>
351 <listitem>
352 <para>
353 <guimenuitem>Wait</guimenuitem>— places you in wait mode.
354 </para>
355 </listitem>
356 </itemizedlist>
357
358 </para>
359 </listitem>
360 </varlistentry>
361
362 <varlistentry>
363 <term><guimenu>Settings</guimenu></term>
364 <listitem>
365 <para>
366 The <guimenu>Settings</guimenu> menu contains only one item:
367 <itemizedlist>
368 <listitem>
369 <para>
370 <guimenuitem>Preferences</guimenuitem>
371 which brings up the preferences dialog box.
372 </para>
373 </listitem>
374 </itemizedlist>
375 </para>
376 </listitem>
377 </varlistentry>
378
379 <varlistentry>
380 <term><guimenu>Help</guimenu></term>
381 <listitem>
382 <para>
383 This menu contains:
384 <itemizedlist>
385 <listitem>
386 <para>
387 <guimenuitem>Contents</guimenuitem>—
388 shows this manual.
389 </para>
390 </listitem>
391 <listitem>
392 <para>
393 <guimenuitem>About</guimenuitem>— shows
394 basic information about
395 <application>GNOME Robots</application>, such as
396 the author's name and the application version number.
397 </para>
398 </listitem>
399 </itemizedlist>
400
401 </para>
402 </listitem>
403 </varlistentry>
404 </variablelist>
405 </sect1>
406
407 <!-- =========Using the Keyboard============== -->
408
409
410 <sect1 id="keyboard">
411 <title>Using the keyboard</title>
412 <para>
413 You can use the keyboard to control the little man. By default, the keys from
414 the keypad are configured for the game. However you can customize the key
415 mappings in the <guimenuitem>Keyboard</guimenuitem> tab in the
416 <guimenuitem>Preferences</guimenuitem> dialog. To select a different key
417 for a command, double-click on the line for that command and then
418 press the key you want to use.
419 </para>
420
421 <sect2 id="default-keys">
422 <title>
423 Default Key Mappings
424 </title>
425 <para>
426 By default, you use the numeric keypad on the
427 right-hand side of the keyboard (not the separate arrow keys).
428 <note>
429 <title>Switch off the NumLock Key</title>
430 <para>
431 You may need to switch off the NumLock to make these work.
432 </para>
433 </note>
434 <orderedlist>
435 <listitem><para>
436 Up Left: <keycap>Home</keycap>
437 </para></listitem>
438 <listitem><para>
439 Up: <keycap>Up</keycap>
440 </para></listitem>
441 <listitem><para>
442 Up Right: <keycap>Page Up</keycap>
443 </para></listitem>
444 <listitem><para>
445 Left: <keycap>Left</keycap>
446 </para></listitem>
447 <listitem><para>
448 Stand Still: <keycap>Begin</keycap>
449 </para></listitem>
450 <listitem><para>
451 Right: <keycap>Right</keycap>
452 </para></listitem>
453 <listitem><para>
454 Down Left: <keycap>End</keycap>
455 </para></listitem>
456 <listitem><para>
457 Down: <keycap>Down</keycap>
458 </para></listitem>
459 <listitem><para>
460 Down Right: <keycap>Page Down</keycap>
461 </para></listitem>
462 <listitem><para>
463 Teleport: <keycap>+</keycap>
464 </para></listitem>
465 <listitem><para>
466 Randomly Teleport: <keycap>*</keycap>
467 </para></listitem>
468 <listitem><para>
469 Wait: <keycap>Enter</keycap>
470 </para></listitem>
471 </orderedlist>
472
473 </para>
474 </sect2>
475
476
477 </sect1>
478
479 <!-- ============= Customization ============================= -->
480
481 <sect1 id="customization">
482 <title>Customizing GNOME Robots</title>
483 <para>
484 You can modify the behaviour and appearance of
485 the game by selecting <guimenuitem>
486 Preferences</guimenuitem>
487 under the <guimenu>Settings</guimenu> menu. This brings up a
488 dialog with three tabs:
489 <itemizedlist>
490 <listitem>
491 <para>
492 <guimenuitem>Game</guimenuitem> — This page allows
493 you to choose the type of game you want to play. The
494 drop-down box at the top of the page allows you to choose from
495 a number of predefined games. You can't change these options in
496 the middle of a game, so they will be disabled then. There are
497 also several options at the bottom of the dialog:
498
499
500 <orderedlist>
501 <listitem><para> The safe moves option will help you to
502 avoid being killed due to a mistake. If you try to make a
503 move that would lead to your death when there is a safe
504 move available, you will not be allowed to proceed. But be
505 warned: if there was no safe move available, other than
506 teleporting, the move will be allowed to proceed.
507
508 </para></listitem>
509 <listitem><para>
510
511 There is also a <quote>super safe mode</quote>. If you select this,
512 you get beeped when there is no safe move and your only
513 option is to teleport out.
514
515 </para></listitem>
516 <listitem><para>
517
518 If you select the sound checkbox the game will play
519 sounds for various events throughout the game.
520
521 </para></listitem>
522 <listitem><para>
523
524 The <quote>Splats</quote> checkbox selects whether you want the sound
525 played and a small <quote>Splat!</quote> to appear on the screen.
526
527 </para></listitem>
528 </orderedlist>
529
530 </para>
531 </listitem>
532 <listitem>
533 <para>
534 <guimenuitem>Appearance</guimenuitem> — This page
535 allows you to select the graphics used throughout the game
536 from the list in the dropdown-box. You can also select the
537 background colour from this tab.
538 </para>
539 </listitem>
540
541 <listitem>
542
543 <para>
544 <guimenuitem>Keyboard</guimenuitem> —
545 This screen allows you to define your own keyboard
546 controls. To select a different key
547 for a command, double-click on the button for that command and then
548 press the key you want to use.
549 </para>
550 </listitem>
551 </itemizedlist>
552 </para>
553
554 <para>
555Any changes you make take effect immediately and are automatically saved.
556</para>
557
558 <para>
559 You can design your own graphics for the game if you want. The graphics
560 files are found in
561 <filename class="directory">
562 $PREFIX/share/gnome-games/gnobots2/pixmaps
563 </filename>, where $PREFIX is the prefix into which GNOME
564 was installed. This is usually either
565 <filename class="directory">/usr</filename>
566 or
567 <filename class="directory">/usr/local</filename>.
568 </para>
569 <para>
570 Each character is 16x16 pixels and there are 14 of them arranged in
571 a PNG file which is 224x16 pixels in size. You can look at the existing
572 files to see the order in which they must be arranged to produce the correct
573 animated sequences.
574 </para>
575 <para>
576 Any graphics files which are placed in the directory are auto-detected,
577 so you don't need to alter any configuration files.
578 You can also define your own game configurations by creating extra
579 <filename>
580 .cfg
581 </filename> files which are stored in the
582 <filename class="directory">
583 $PREFIX/share/gnome-games/gnobots2/games
584 </filename>
585 directory.
586 </para>
587 </sect1>
588
589 <!-- ============= Various Sections ============================= -->
590
591
592 <!-- ============= Bugs ================================== -->
593 <!-- This section should describe known bugs and limitations of
594 the program if there are any - please be frank and list all
595 problems you know of. -->
596<!-- <sect1 id="bugs">
597 <title>Known Bugs and Limitations</title>
598 <para>
599 This application has no known bugs.
600 </para>
601 </sect1>
602-->
603
604<!-- ============= Authors ================================ -->
605
606 <sect1 id="authors">
607 <title>Authors</title>
608 <para>
609 <application>GNOME Robots</application> was written by Mark Rae
610 (<email>m.rae@inpharmatica.co.uk</email>).
611 This manual was written by Patanjali Somayaji
612 (<email>patanjali@mindless.com</email>), from the original
613 HTML documentation by Mark Rae.
614 To report a bug or make a suggestion regarding this application or
615 this manual, follow the directions in this
616 <ulink url="ghelp:user-guide?feedback-bugs" type="help">document</ulink>.
617 </para>
618
619 <!-- For translations: uncomment this:
620
621 <para>
622 Latin translation was done by ME
623 (<email>MYNAME@MYADDRESS</email>). Please send all comments and
624 suggestions regarding this translation to SOMEWHERE.
625 </para>
626
627 -->
628
629 </sect1>
630
631
632 <!-- ============= Application License ============================= -->
633
634 <sect1 id="license">
635 <title>License</title>
636 <para>
637 This program is free software; you can redistribute it and/or
638 modify it under the terms of the <ulink type="help" url="gnome-help:gpl">
639 <citetitle>GNU General Public License</citetitle></ulink> as
640 published by the Free Software Foundation;
641 either version 2 of the License, or (at your option) any later
642 version.
643 </para>
644 <para>
645 This program is distributed in the hope that it will be useful, but
646 WITHOUT ANY WARRANTY; without even the implied warranty of
647 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
648 <citetitle>GNU General Public License</citetitle> for more details.
649 </para>
650 <para>
651 A copy of the <citetitle>GNU General Public License</citetitle> is
652 included as an appendix to the <citetitle>GNOME Users
653 Guide</citetitle>. You may also obtain a copy of the
654 <citetitle>GNU General Public License</citetitle> from the Free
655 Software Foundation by visiting <ulink type="http"
656 url="http://www.fsf.org">their Web site</ulink> or by writing to
657 <address>
658 Free Software Foundation, Inc.
659 <street>51 Franklin Street, Fifth Floor</street>
660 <city>Boston</city>, <state>MA</state> <postcode>02110-1301</postcode>
661 <country>USA</country>
662 </address>
663 </para>
664 </sect1>
665
666</article>
0667
=== added file '.pc/90_fix-help-links.patch/gnobots2/help/C/index.docbook'
=== added file '.pc/90_fix-help-links.patch/gnobots2/help/Makefile.am'
--- .pc/90_fix-help-links.patch/gnobots2/help/Makefile.am 1970-01-01 00:00:00 +0000
+++ .pc/90_fix-help-links.patch/gnobots2/help/Makefile.am 2012-12-26 19:18:24 +0000
@@ -0,0 +1,13 @@
1@YELP_HELP_RULES@
2HELP_ID = gnobots2
3
4HELP_MEDIA = \
5 figures/gnobots2-main.png
6
7HELP_FILES = \
8 gnobots2.xml \
9 legal.xml
10
11HELP_LINGUAS = ca cs da de el en_GB es eu fr it oc sl sr sr@latin sv zh_CN
12
13-include $(top_srcdir)/git.mk
014
=== added directory '.pc/90_fix-help-links.patch/gnotski'
=== added directory '.pc/90_fix-help-links.patch/gnotski/help'
=== added directory '.pc/90_fix-help-links.patch/gnotski/help/C'
=== added file '.pc/90_fix-help-links.patch/gnotski/help/C/gnotski.xml'
--- .pc/90_fix-help-links.patch/gnotski/help/C/gnotski.xml 1970-01-01 00:00:00 +0000
+++ .pc/90_fix-help-links.patch/gnotski/help/C/gnotski.xml 2012-12-26 19:18:24 +0000
@@ -0,0 +1,407 @@
1<?xml version="1.0"?>
2<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
4 <!ENTITY legal SYSTEM "legal.xml">
5 <!ENTITY appversion "2.12">
6 <!ENTITY manrevision "2.10">
7 <!ENTITY date "March 2004">
8 <!ENTITY app "<application>Klotski</application>">
9 <!-- Information about the entities
10 The legal.xml file contains legal information, there is no need to edit the file.
11 Use the appversion entity to specify the version of the application.
12 Use the manrevision entity to specify the revision number of this manual.
13 Use the date entity to specify the release date of this manual.
14 Use the app entity to specify the name of the application. -->
15]>
16
17<!--
18 Maintained by the GNOME Documentation Project
19 http://developer.gnome.org/projects/gdp
20 Template version: 2.0 beta
21 Template last modified Apr 11, 2002
22-->
23<!-- =============Document Header ============================= -->
24<article id="index" lang="en">
25<!-- please do not change the id; for translations, change lang to -->
26<!-- appropriate code -->
27 <articleinfo>
28 <title>&app; Manual</title>
29
30 <abstract role="description">
31 <para>
32 Klotski is a puzzle game of which the objective is to get the
33 patterned block to the marker, which is done by moving the blocks
34 in its way.
35 </para>
36 </abstract>
37
38 <copyright>
39 <year>2002</year>
40 <holder>Andrew Sobala</holder>
41 </copyright>
42<!-- translators: uncomment this:
43
44 <copyright>
45 <year>2002</year>
46 <holder>ME-THE-TRANSLATOR (Latin translation)</holder>
47 </copyright>
48
49 -->
50<!-- An address can be added to the publisher information. If a role is
51 not specified, the publisher/author is the same for all versions of the
52 document. -->
53 <publisher>
54 <publishername> GNOME Documentation Project </publishername>
55 </publisher>
56
57 &legal;
58 <!-- This file contains link to license for the documentation (GNU FDL), and
59 other legal stuff such as "NO WARRANTY" statement. Please do not change
60 any of this. -->
61
62 <authorgroup>
63 <author>
64 <firstname>Andrew</firstname>
65 <surname>Sobala</surname>
66 <affiliation>
67 <orgname>GNOME Documentation Project</orgname>
68 <address> <email>andrew@sobala.net</email> </address>
69 </affiliation>
70 </author>
71
72 <othercredit role="author">
73 <firstname>Lars</firstname>
74 <surname>Rydlinge</surname>
75 <affiliation>
76 <orgname>GNOME Project</orgname>
77 <address> <email> Lars.Rydlinge@HIG.SE </email> </address>
78 </affiliation>
79 </othercredit>
80
81 <othercredit role="maintainer">
82 <firstname>Ross</firstname>
83 <surname>Burton</surname>
84 <affiliation>
85 <orgname>GNOME Project</orgname>
86 <address> <email> ross@burtonini.com </email> </address>
87 </affiliation>
88 </othercredit>
89
90<!-- This is appropriate place for other contributors: translators,
91 maintainers, etc.
92
93 <othercredit role="translator">
94 <firstname>Latin</firstname>
95 <surname>Translator 1</surname>
96 <affiliation>
97 <orgname>Latin Translation Team</orgname>
98 <address> <email>translator@gnome.org</email> </address>
99 </affiliation>
100 <contrib>Latin translation</contrib>
101 </othercredit>
102-->
103 </authorgroup>
104
105 <releaseinfo revision="2.26" role="review"/>
106
107
108<!-- According to GNU FDL, revision history is mandatory if you are -->
109<!-- modifying/reusing someone else's document. If not, you can omit it. -->
110<!-- Remember to remove the &manrevision; entity from the revision entries other
111-->
112<!-- than the current revision. -->
113<!-- The revision numbering system for GNOME manuals is as follows: -->
114<!-- * the revision number consists of two components -->
115<!-- * the first component of the revision number reflects the release version of the GNOME desktop. -->
116<!-- * the second component of the revision number is a decimal unit that is incremented with each revision of the manual. -->
117<!-- For example, if the GNOME desktop release is V2.x, the first version of the manual that -->
118<!-- is written in that desktop timeframe is V2.0, the second version of the manual is V2.1, etc. -->
119<!-- When the desktop release version changes to V3.x, the revision number of the manual changes -->
120<!-- to V3.0, and so on. -->
121 <revhistory>
122<!--
123 <revision>
124 <revnumber>Full title of previous manual.</revnumber>
125 <date>Release date of previous manual.</date>
126 <revdescription>
127 <para role="author">Documentation Writer 1
128 <email>docwriter1@gnome.org</email>
129 </para>
130 <para role="publisher">GNOME Documentation Project</para>
131 </revdescription>
132 </revision>
133-->
134
135 <revision>
136 <revnumber>V2.0</revnumber>
137 <date>13 August 2002</date>
138 <revdescription>
139 <para role="author">Andrew Sobala
140 <email>andrew@sobala.net</email>
141 </para>
142 <para role="publisher">GNOME Documentation Project</para>
143 </revdescription>
144 </revision>
145
146 </revhistory>
147
148 <releaseinfo>This manual describes version &appversion; of GNOME Klotski.
149 </releaseinfo>
150 <legalnotice>
151 <title>Feedback</title>
152 <para>To report a bug or make a suggestion regarding the &app; application or
153 this manual, follow the directions in the <ulink url="ghelp:user-guide?feedback-bugs"
154 type="help">GNOME Feedback Page</ulink>.
155 </para>
156<!-- Translators may also add here feedback address for translations -->
157 </legalnotice>
158 </articleinfo>
159
160 <indexterm zone="index">
161 <primary>GNOME Klotski</primary>
162 </indexterm>
163
164<!-- ============= Document Body ============================= -->
165<!-- ============= Introduction ============================== -->
166 <sect1 id="gnotski-introduction">
167 <title>Introduction</title>
168 <para>The &app; application is a clone of the Klotski game. The objective is to move the patterned block to
169 the area bordered by green markers.</para>
170
171 <para> &app; was written by Lars Rydlinge
172 (<email>Lars.Rydlinge@HIG.SE</email>).</para>
173
174 <para>&app; is included in the gnome-games package, which is part of the GNOME desktop environment.
175 This document describes version &appversion; of &app;. </para>
176
177 <para> This program is distributed under the terms of the GNU
178 General Public license as published by the Free Software
179 Foundation; either version 2 of the License, or (at your option)
180 any later version. A copy of this license can be found at this
181 <ulink url="ghelp:gpl" type="help">link</ulink>, or in the file
182 COPYING included with the source code of this program. </para>
183
184 <para>
185 To report a bug or make a suggestion regarding this application or
186 this manual, follow the directions in this
187 <ulink url="ghelp:user-guide?feedback-bugs" type="help">document</ulink>.
188 </para>
189 </sect1>
190
191<!-- ===========Objective ============================== -->
192<sect1 id="gnotski-objective">
193 <title>Objective</title>
194 <para>The objective of &app; is to move the patterned block to the green markers in as few moves as
195 possible. You do this by moving the blocks one at a time with the mouse until you can get the patterned
196 block to the markers.
197
198 <!-- ==== Figure ==== -->
199 <figure id="gnotski-figure-win">
200 <title>The winning move</title>
201 <screenshot>
202 <mediaobject>
203 <imageobject>
204 <imagedata fileref="figures/gnotski_win.png" format="PNG"/>
205 </imageobject>
206 <textobject>
207 <phrase>The patterned block should be moved to the space bordered by the green
208 markers.</phrase>
209 </textobject>
210 </mediaobject>
211 </screenshot>
212 </figure></para>
213 <!-- ==== End of Figure ==== -->
214</sect1>
215
216<!-- =========== Getting Started ============================== -->
217
218 <sect1 id="gnotski-playing">
219 <title>Playing &app;</title>
220 <para>
221 <itemizedlist>
222 <listitem>
223 <para>
224 <xref linkend="gnotski-start"/></para>
225 </listitem>
226 <listitem>
227 <para>
228 <xref linkend="gnotski-ui"/></para>
229 </listitem>
230 <listitem>
231 <para>
232 <xref linkend="gnotski-new-game"/></para>
233 </listitem>
234 <listitem>
235 <para>
236 <xref linkend="gnotski-moving"/></para>
237 </listitem>
238 </itemizedlist> </para>
239
240 <!-- =========== To start gnotski ============================== -->
241 <sect2 id="gnotski-start">
242 <title>To Start &app;</title>
243 <para>You can start &app; from the Applications menu by choosing
244 <menuchoice>
245 <guisubmenu>Games</guisubmenu>
246 <guimenuitem>Gnotski</guimenuitem>
247 </menuchoice>.</para>
248 </sect2>
249
250 <!-- =========== The main window ============================== -->
251 <sect2 id="gnotski-ui">
252 <title>The main window</title>
253 <para>When you start <application>&app;</application>, the following window is displayed.</para>
254
255 <!-- ==== Figure ==== -->
256 <figure id="gnotski-figure-mainwindow">
257 <title>&app; Start Up Window</title>
258 <screenshot>
259 <mediaobject>
260 <imageobject>
261 <imagedata fileref="figures/gnotski_start_window.png" format="PNG"/>
262 </imageobject>
263 <textobject>
264 <phrase>Shows &app; main window. Contains titlebar, menubar, game area
265 and statusbar. Menubar contains Game and Help menus. </phrase>
266 </textobject>
267 </mediaobject>
268 </screenshot>
269 </figure>
270 <!-- ==== End of Figure ==== -->
271
272 <para>The &app; window contains the following elements:
273 <variablelist>
274 <varlistentry>
275 <term>Menubar</term>
276 <listitem>
277 <variablelist>
278 <varlistentry>
279 <term>Game menu</term>
280 <listitem>
281 <para>The game menu allows you to start new games, view the highest scores and
282 quit the program.</para>
283 </listitem>
284 </varlistentry>
285 <varlistentry>
286 <term>Help menu</term>
287 <listitem>
288 <para>The help menu allows you to view the documentation for &app;</para>
289 </listitem>
290 </varlistentry>
291 </variablelist>
292 </listitem>
293 </varlistentry>
294 <varlistentry>
295 <term>Game area</term>
296 <listitem>
297 <para>The game area shows the blocks in the current game. You can drag the blocks around with
298 the mouse as described in <xref linkend="gnotski-moving"/>.
299 </para>
300 </listitem>
301 </varlistentry>
302 <varlistentry>
303 <term>Statusbar</term>
304 <listitem>
305 <para>The statusbar shows how many moves you have taken so far.</para>
306 </listitem>
307 </varlistentry>
308 </variablelist></para>
309
310 </sect2>
311
312 <!-- =========== Starting a new game ============================== -->
313 <sect2 id="gnotski-new-game">
314 <title>Starting a new game</title>
315 <para>Use the <guimenu>Game menu</guimenu> to start a new game. The items
316 <guimenuitem>Next Puzzle</guimenuitem> and <guimenuitem>Previous Puzzle</guimenuitem> allows you to
317 navigate the puzzles sequentially. Each puzzle belongs to one of the three categories found in the
318 submenus named <guisubmenu>HuaRong Trail</guisubmenu>, <guisubmenu>Challenge Pack</guisubmenu> and
319 <guisubmenu>Skill Pack</guisubmenu>.In these submenus,
320 each puzzle name refers to a game scenario.
321 </para>
322 <example>
323 <title>Starting a game</title>
324 <para>To start a game, choose
325 <menuchoice>
326 <guimenu>Game</guimenu>
327 <guisubmenu>[category]</guisubmenu>
328 <guimenuitem>[game scenario]</guimenuitem>
329 </menuchoice>
330 </para></example>
331 </sect2>
332
333 <!-- ===========Moving blocks ============================== -->
334 <sect2 id="gnotski-moving">
335 <title>Moving blocks</title>
336 <para>To move a block, click on it, hold down the mouse button and drag it to its new location.
337 You cannot move the green blocks or the block that borders the game. You cannot move a block to a
338 space already occupied by another block, with the exception that you may move the patterned block
339 through the green blocks to win.
340 </para>
341 </sect2>
342
343</sect1>
344
345<!-- Known bugs. Try to manage user expectations and warn them of known bugs
346but it is better to omit this section than give a false sense of perfection
347<sect1 id="gnotski-bugs">
348 <title>Known Bugs and Limitations</title>
349 <para>
350 There are no known bugs in this game.
351 </para>
352</sect1>
353-->
354
355<sect1 id="authors">
356 <title>Authors</title>
357 <para>
358 <application>Klotski</application> was written by Lars Rydlinge
359 (<email>lars.rydlinge@hig.se</email>). This manual was written by Andrew Sobala.
360 To report a bug or make a suggestion regarding this application or
361 this manual, follow the directions in this
362 <ulink url="ghelp:user-guide?feedback-bugs" type="help">document</ulink>.
363 </para>
364
365 <!-- For translations: uncomment this:
366
367 <para>
368 Latin translation was done by ME
369 (<email>MYNAME@MYADDRESS</email>). Please send all comments and
370 suggestions regarding this translation to SOMEWHERE.
371 </para>
372
373 -->
374</sect1>
375
376 <sect1 id="license">
377 <title>License</title>
378 <para>
379 This program and tile artwork is free software; you can redistribute it and/or
380 modify it under the terms of the <citetitle>GNU General Public
381 License</citetitle> as published by the Free Software Foundation;
382 either version 2 of the License, or (at your option) any later
383 version.
384 </para>
385 <para>
386 This program is distributed in the hope that it will be useful, but
387 WITHOUT ANY WARRANTY; without even the implied warranty of
388 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
389 <citetitle>GNU General Public License</citetitle> for more details.
390 </para>
391 <para>
392 A copy of the <citetitle>GNU General Public License</citetitle> is
393 included as an appendix to the <citetitle>GNOME Users
394 Guide</citetitle>. You may also obtain a copy of the
395 <citetitle>GNU General Public License</citetitle> from the Free
396 Software Foundation by visiting <ulink type="http"
397 url="http://www.fsf.org">their Web site</ulink> or by writing to
398 <address>
399 Free Software Foundation, Inc.
400 <street>59 Temple Place</street> - Suite 330
401 <city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode>
402 <country>USA</country>
403 </address>
404 </para>
405 </sect1>
406
407</article>
0408
=== added file '.pc/90_fix-help-links.patch/gnotski/help/C/index.docbook'
=== added file '.pc/90_fix-help-links.patch/gnotski/help/Makefile.am'
--- .pc/90_fix-help-links.patch/gnotski/help/Makefile.am 1970-01-01 00:00:00 +0000
+++ .pc/90_fix-help-links.patch/gnotski/help/Makefile.am 2012-12-26 19:18:24 +0000
@@ -0,0 +1,14 @@
1@YELP_HELP_RULES@
2HELP_ID = gnotski
3
4HELP_MEDIA = \
5 figures/gnotski_start_window.png \
6 figures/gnotski_win.png
7
8HELP_FILES = \
9 gnotski.xml \
10 legal.xml
11
12HELP_LINGUAS = ca cs da de el en_GB es eu fr it oc sl sr sr@latin sv zh_CN
13
14-include $(top_srcdir)/git.mk
015
=== added directory '.pc/90_fix-help-links.patch/gtali'
=== added directory '.pc/90_fix-help-links.patch/gtali/help'
=== added directory '.pc/90_fix-help-links.patch/gtali/help/C'
=== added file '.pc/90_fix-help-links.patch/gtali/help/C/gtali.xml'
--- .pc/90_fix-help-links.patch/gtali/help/C/gtali.xml 1970-01-01 00:00:00 +0000
+++ .pc/90_fix-help-links.patch/gtali/help/C/gtali.xml 2012-12-26 19:18:24 +0000
@@ -0,0 +1,492 @@
1<?xml version="1.0"?>
2<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
4 <!ENTITY legal SYSTEM "legal.xml">
5 <!ENTITY appversion "2.12">
6 <!ENTITY manrevision "2.8">
7 <!ENTITY date "September 2004">
8 <!ENTITY app "<application>Tali</application>">
9 <!ENTITY appname "Tali">
10 <!ENTITY version "2.8">
11]>
12
13<!--
14 (Do not remove this comment block.)
15 Maintained by the GNOME Documentation Project
16 http://developer.gnome.org/projects/gdp
17 Template version: 2.0 beta
18 Template last modified Feb 12, 2002
19-->
20
21<!-- =============Document Header ============================= -->
22
23<article id="index" lang="en">
24<!-- please do not change the id; for translations, change lang to -->
25<!-- appropriate code -->
26 <articleinfo>
27 <title>&app; Manual</title>
28 <abstract role="description">
29 <para>
30 Tali is like Yahtzee for GNOME or like poker with dice. The player
31 rolls dice to try to make the best possible combinations, like
32 4 of a kind, small straight, and full house. The player is allowed
33 3 rolls per turn and can hold certain dice with each roll.
34 </para>
35 </abstract>
36 <copyright>
37 <year>2001</year>
38 <holder>Scott D. Heavner</holder>
39 </copyright>
40
41 <!-- translators: uncomment this:
42
43 <copyright>
44 <year>2000</year>
45 <holder>ME-THE-TRANSLATOR (Latin translation)</holder>
46 </copyright>
47
48 -->
49<!-- An address can be added to the publisher information. If a role is
50 not specified, the publisher/author is the same for all versions of the
51 document. -->
52 <publisher>
53 <publishername> GNOME Documentation Project </publishername>
54 </publisher>
55
56 &legal;
57 <!-- This file contains link to license for the documentation (GNU FDL), and
58 other legal stuff such as "NO WARRANTY" statement. Please do not change
59 any of this. -->
60
61 <authorgroup>
62 <author role="maintainer">
63 <firstname>Scott D</firstname>
64 <surname>Heavner</surname>
65 <affiliation>
66 <address> <email>sdh@po.cwru.edu</email> </address>
67 </affiliation>
68 </author>
69<!-- This is appropriate place for other contributors: translators,
70 maintainers, etc. Commented out by default.
71 <othercredit role="translator">
72 <firstname>Latin</firstname>
73 <surname>Translator 1</surname>
74 <affiliation>
75 <orgname>Latin Translation Team</orgname>
76 <address> <email>translator@gnome.org</email> </address>
77 </affiliation>
78 <contrib>Latin translation</contrib>
79 </othercredit>
80-->
81 </authorgroup>
82
83 <releaseinfo revision="2.26" role="review"/>
84
85 <revhistory>
86 <revision>
87 <revnumber>&appname; Manual V&manrevision;</revnumber>
88 <date>&date;</date>
89 <revdescription>
90 <para role="author">Scott D Heavner
91 <email>sdh@po.cwru.edu</email>
92 </para>
93 <para role="publisher">GNOME Documentation Project</para>
94 </revdescription>
95 </revision>
96 </revhistory>
97
98 <releaseinfo>This manual describes version &appversion; of &appname;.
99 </releaseinfo>
100 <!-- The following feedback information only applies to appliactions
101 listed in bugzilla.gnome.org and bugzilla.ximian.com. For other
102 applications, please provide your own feedback info or remove thsi
103 section altogether -->
104 <legalnotice>
105 <title>Feedback</title>
106 <para>To report a bug or make a suggestion regarding the &app; application or
107 this manual, follow the directions in the
108 <ulink url="ghelp:user-guide?feedback-bugs"
109 type="help">GNOME Feedback Page</ulink>.
110 </para>
111<!-- Translators may also add here feedback address for translations -->
112 </legalnotice>
113
114 </articleinfo>
115
116 <indexterm zone="index">
117 <primary>GNOME Tali</primary>
118 </indexterm>
119
120 <!-- ============= Document Body ============================= -->
121
122 <sect1 id="intro">
123 <title>Introduction</title>
124
125 <para>
126 <application>GNOME Tali</application> is a sort of poker with
127 dice and less money. You roll five dice three times and try to
128 create the best <quote>hand</quote>. Your two rerolls may include
129 any or all of your dice.
130 </para>
131 <para>
132 <application>GNOME Tali</application> is very similar to the
133 dice game Yahtzee which is a trademark of Hasbro, Inc.
134 </para>
135
136 <para>
137 To run <application>GNOME Tali</application>, select
138 <menuchoice>
139 <guisubmenu>Games</guisubmenu>
140 <guimenuitem>GNOME Tali</guimenuitem>
141 </menuchoice>
142 from the <guimenu>Main Menu</guimenu>, or type
143 <command>gtali</command> on the command line.
144 </para>
145
146 <para>
147 <application>GNOME Tali</application> is included in the
148 <filename>gnome-games</filename> package, which is part of the
149 GNOME desktop environment. This document describes version
150 &version; of <application>GNOME Tali</application>.
151 </para>
152 </sect1>
153
154 <sect1 id="playing">
155 <title>Playing GNOME Tali</title>
156
157 <figure id="shot1">
158 <title>GNOME Tali in action</title>
159 <screenshot>
160 <mediaobject>
161 <imageobject>
162 <imagedata fileref="figures/mainwindow.png" format="PNG"
163 srccredit="Trevor Curtis"/>
164 </imageobject>
165 <textobject>
166 <phrase>GNOME Tali main window screenshot.</phrase>
167 </textobject>
168 </mediaobject>
169 </screenshot>
170 </figure>
171
172 <para>
173 When play starts, you see the results of your first throw of the
174 dice.
175 </para>
176
177 <orderedlist>
178 <listitem>
179 <para>Click on the dice you wish to roll again.
180 </para>
181 </listitem>
182 <listitem>
183 <para>When you have selected all the dice you wish to reroll,
184 press the <guibutton>Roll!</guibutton> button.
185 </para>
186 </listitem>
187 <listitem>
188 <para>When you have a hand you like or have run out of chances
189 to throw the dice, click on a row corresponding to what you think
190 is your best scoring combination. It is very possible to have
191 a score of zero and if you click on the wrong row, you
192 will be scored accordingly. (Say for example, you get
193 yahtzee -- 5 of a kind -- and click on the large straight row,
194 you will receive a zero in your large straight score).</para>
195 </listitem>
196 </orderedlist>
197
198 <para>You can only use each combination once, i.e. once you've entered
199 something in a slot, you can't change the score later if you roll a
200 better hand.
201 </para>
202
203 <para>There is one exception to this rule, if you roll a yahtzee a
204 second time you can put it in the yahtzee row again for an extra
205 fifty points. You can keep doing this each time you get another
206 yahtzee. At the end of the game you will be given extra rolls to
207 fill in the other rows. Be warned that if you score zero in your
208 yahtzee row (i.e. you filled that row with something that wasn't
209 a yahtzee) then you can't put a yahtzee in afterward, zero is all
210 you will score.
211 </para>
212
213 <para>There is also a bonus of 35 points if you score a total of
214 63 points or more in the top six rows.
215 </para>
216
217 <sect2 id="keyboard">
218 <title>Using the keyboard</title>
219
220 <para>As an alternative to using the mouse, the keys 1 through 5
221 toggle the dice just as if you had clicked them. The key 1
222 corresponds to the first die and so on. Use the usual controls to
223 roll the dice and select a row. i.e. use tab to switch between the
224 roll button and the score area, use the arrow keys to navigate up
225 and down the rows and use space to select.</para>
226
227 </sect2>
228
229 </sect1>
230
231 <sect1 id="options">
232 <title>Game Options</title>
233
234 <figure id="shot2">
235 <title>GNOME Tali preferences</title>
236 <screenshot>
237 <mediaobject>
238 <imageobject>
239 <imagedata fileref="figures/preferences.png" format="PNG"
240 srccredit="Trevor Curtis"/>
241 </imageobject>
242 <textobject>
243 <phrase>GNOME Tali preferences dialog box.</phrase>
244 </textobject>
245 </mediaobject>
246 </screenshot>
247 </figure>
248 <variablelist><title>Human Players</title>
249 <varlistentry>
250 <term><guimenuitem>Number of players</guimenuitem></term>
251 <listitem>
252 <para>Selects the number of human players. As described
253 above you are only allowed six total
254 players.
255 </para>
256 </listitem>
257 </varlistentry>
258 </variablelist>
259
260 <variablelist><title>Computer Opponents</title>
261 <varlistentry>
262 <term><guimenuitem>Delay between rolls</guimenuitem></term>
263 <listitem>
264 <para>Make the computer opponents pause between rolls
265 of the dice so you can see what they are doing. Slows down
266 game play some.
267 </para>
268 </listitem>
269 </varlistentry>
270 <varlistentry>
271 <term><guimenuitem>Number of opponents</guimenuitem></term>
272 <listitem>
273 <para>Select the number of computer opponents. You are allowed a
274 total of six human and computer players. If you attempt to
275 increase this number near the limit, the number of human players
276 will be decreased to maintain only six total
277 players.
278 </para>
279 </listitem>
280 </varlistentry>
281 </variablelist>
282
283 <variablelist><title>Game Type</title>
284 <varlistentry>
285 <term><guimenuitem>Version of the game to play</guimenuitem></term>
286 <listitem>
287 <para>Play either the regular version (similar to Yahtzee) or the
288 version with colors (similar to Kismet). When you change game type,
289 you must restart the game to see use the new game type.
290 </para>
291 </listitem>
292 </varlistentry>
293 </variablelist>
294
295 <variablelist>
296 <varlistentry>
297 <term><guimenuitem>Player Names</guimenuitem></term>
298 <listitem>
299 <para>To change the names of the players just enter new
300 names in the boxes.
301 </para>
302 </listitem>
303 </varlistentry>
304 </variablelist>
305 </sect1>
306
307 <sect1 id="strategy">
308 <title>Game Strategy</title>
309 <para>The 63 points needed for the bonus in the upper half
310 corresponds to getting three of each die type in each row. If
311 you score more than three dice in the fives and sixes rows then
312 you can afford to place a bad roll in either the ones row or the
313 twos row and still get the bonus.
314 In the Colors version, you get a bonus of 55 if your upper half total
315 is between 71 and 77, and a bonus of 75 if your upper half total is
316 greater than 77.
317 </para>
318 <para>Don't forget about multiple yahtzees, if you roll a second
319 yahtzee you can also put it in the yahtzee row for even more points.
320 This only applies to the regular game.
321 </para>
322 </sect1>
323 <!-- ============= Bugs ================================== -->
324 <!-- This section should describe known bugs and limitations of
325 the program if there are any - please be frank and list all
326 problems you know of.
327
328 Better to leave this section out than to say something unhelpful.
329-->
330
331 <sect1 id="bugs">
332 <title>Known Bugs and Limitations</title>
333 <para>
334 When you switch game type, the game does not use the new dice images
335 until you restart gtali. It should play correctly with the "wrong" dice.
336 </para>
337 </sect1>
338
339
340 <sect1 id="glossary">
341 <title>Glossary</title>
342 <note>
343 <para>Remember that the order of the dice is not important.</para>
344 </note>
345 <glossary>
346 <glossentry id="threeofakind"><glossterm>3 of a Kind</glossterm>
347 <glossdef><para>
348 Three of the dice have the same number. The score is the
349 total of all the dice. e.g. 1, 2, 2, 2, 5.
350 </para></glossdef>
351 </glossentry>
352 <glossentry id="fourofakind"><glossterm>4 of a Kind</glossterm>
353 <glossdef><para>
354 Four of the dice have the same number. The score is the
355 total of all the dice. e.g. 2, 5, 5, 5, 5.
356 In the Colors game, the score is 25 plus the total of all the dice.
357 </para></glossdef>
358 </glossentry>
359 <glossentry id="yahtzee"><glossterm>5 of a Kind</glossterm>
360 <glossdef><para>
361 Five identical dice. e.g. 3, 3, 3, 3, 3.
362 In the Colors game, the score is 50 plus the total of all the dice.
363 </para></glossdef>
364 </glossentry>
365 <glossentry id="fullhouse"><glossterm>Full House</glossterm>
366 <glossdef><para>
367 Five dice consisting of two groups: One group of three with
368 the same numbers and another group of two with the same
369 numbers. e.g. 1, 1, 1, 4, 4.
370 In the Colors game, the score is 15 plus the total of all the dice.
371 </para></glossdef>
372 </glossentry>
373 <glossentry id="fullhousesamecolor"><glossterm>Full House Same Color</glossterm>
374 <glossdef><para>
375 This category is only used in the Colors game.
376 Five dice consisting of two groups: One group of three with
377 the same numbers and another group of two with the same
378 numbers. The numbers must be all the same color. e.g. 3, 3, 3, 4, 4.
379 Two dice are the same color if their numbers total 7: 1 and 6 are black,
380 2 and 5 are red, and 3 and 4 are green.
381 The score is 20 plus the total of all the dice.
382 </para></glossdef>
383 </glossentry>
384 <glossentry id="twopairsamecolor"><glossterm>Two Pair Same Color</glossterm>
385 <glossdef><para>
386 This category is only used in the Colors game.
387 Five dice consisting of two groups: One group of two with
388 the same numbers and another group of two with the same
389 numbers. The pairs must be all the same color. e.g. 3, 3, 4, 4.
390 Two dice are the same color if their numbers total 7: 1 and 6 are black,
391 2 and 5 are red, and 3 and 4 are green. The fifth die can be any value.
392 The score is the total of all the dice.
393 </para></glossdef>
394 </glossentry>
395 <glossentry id="flush"><glossterm>Flush</glossterm>
396 <glossdef><para>
397 This category is only used in the Colors game.
398 Five dice that are all the same "color":
399 Two dice are the same color if their numbers total 7: 1 and 6 are black,
400 2 and 5 are red, and 3 and 4 are green. The fifth die can be any value.
401 The score is 35 points.
402 </para></glossdef>
403 </glossentry>
404 <glossentry id="largestraight"><glossterm>Large Straight</glossterm>
405 <glossdef><para>
406 Five dice with consecutive numbers. e.g. 2, 3, 4, 5, 6.
407 The score is 40 points.
408 </para></glossdef>
409 </glossentry>
410 <glossentry id="smallstraight"><glossterm>Small Straight</glossterm>
411 <glossdef><para>
412 Four dice with consecutive numbers. The fifth die can be
413 any number. e.g. 2, 3, 4, 5, 5.
414 This category is only used in the regular game.
415 The score is 30 points.
416 </para></glossdef>
417 </glossentry>
418 </glossary>
419 </sect1>
420
421
422<!-- ============= Authors ================================ -->
423
424 <sect1 id="authors">
425 <title>Authors</title>
426 <para>
427 <application>GNOME Tali</application> was written by Scott Heavner
428 (<email>sdh@po.cwru.edu</email>) and Orest Zborowski.
429 This manual was written by Scott D Heavner
430 (<email>sdh@po.cwru.edu</email>) with extra material added by
431 Callum McKenzie (<email>callum@physics.otago.ac.nz</email>).
432 To report a bug or make a suggestion regarding this application or
433 this manual, follow the directions in this
434 <ulink url="ghelp:user-guide?feedback-bugs" type="help">document</ulink>.
435 </para>
436
437
438 <!-- For translations: uncomment this:
439
440 <para>
441 Latin translation was done by ME
442 (<email>MYNAME@MYADDRESS</email>). Please send all comments and
443 suggestions regarding this translation to SOMEWHERE.
444 </para>
445
446 -->
447
448 </sect1>
449
450 <!-- ============= Application License ============================= -->
451
452 <sect1 id="license">
453 <title>License</title>
454 <para>
455 This program is free software; you can redistribute it and/or
456 modify it under the terms of the <ulink type="help" url="gnome-help:gpl">
457 <citetitle>GNU General Public License</citetitle></ulink> as
458 published by the Free Software Foundation;
459 either version 2 of the License, or (at your option) any later
460 version.
461 </para>
462 <para>
463 This program is distributed in the hope that it will be useful, but
464 WITHOUT ANY WARRANTY; without even the implied warranty of
465 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
466 <citetitle>GNU General Public License</citetitle> for more details.
467 </para>
468 <para>
469 A copy of the <citetitle>GNU General Public License</citetitle> is
470 included as an appendix to the <citetitle>GNOME Users
471 Guide</citetitle>. You may also obtain a copy of the
472 <citetitle>GNU General Public License</citetitle> from the Free
473 Software Foundation by visiting <ulink type="http"
474 url="http://www.fsf.org">their Web site</ulink> or by writing to
475 <address>
476 Free Software Foundation, Inc.
477 <street>59 Temple Place</street> - Suite 330
478 <city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode>
479 <country>USA</country>
480 </address>
481 </para>
482 </sect1>
483</article>
484
485
486
487
488
489
490
491
492
0493
=== added file '.pc/90_fix-help-links.patch/gtali/help/C/index.docbook'
=== added file '.pc/90_fix-help-links.patch/gtali/help/Makefile.am'
--- .pc/90_fix-help-links.patch/gtali/help/Makefile.am 1970-01-01 00:00:00 +0000
+++ .pc/90_fix-help-links.patch/gtali/help/Makefile.am 2012-12-26 19:18:24 +0000
@@ -0,0 +1,14 @@
1@YELP_HELP_RULES@
2HELP_ID = gtali
3
4HELP_MEDIA = \
5 figures/mainwindow.png \
6 figures/preferences.png
7
8HELP_FILES = \
9 gtali.xml \
10 legal.xml
11
12HELP_LINGUAS = ca cs da de el en_GB es eu fr gl it oc pt_BR sl sr sr@latin sv zh_CN
13
14-include $(top_srcdir)/git.mk
015
=== modified file '.pc/applied-patches'
--- .pc/applied-patches 2012-04-17 16:31:36 +0000
+++ .pc/applied-patches 2012-12-26 19:18:24 +0000
@@ -1,3 +1,7 @@
101_lpi.patch101_lpi.patch
202_desktop-path.patch202_desktop-path.patch
303_add-keywords.patch303_add-keywords.patch
490_fix-help-links.patch
5en_passant_pawns_only.patch
6en_passant_remove_victim.patch
7cant_castle_after_rook_taken.patch
48
=== added directory '.pc/cant_castle_after_rook_taken.patch'
=== added directory '.pc/cant_castle_after_rook_taken.patch/glchess'
=== added directory '.pc/cant_castle_after_rook_taken.patch/glchess/src'
=== added file '.pc/cant_castle_after_rook_taken.patch/glchess/src/chess-game.vala'
--- .pc/cant_castle_after_rook_taken.patch/glchess/src/chess-game.vala 1970-01-01 00:00:00 +0000
+++ .pc/cant_castle_after_rook_taken.patch/glchess/src/chess-game.vala 2012-12-26 19:18:24 +0000
@@ -0,0 +1,1428 @@
1public enum Color
2{
3 WHITE,
4 BLACK
5}
6
7public class ChessPlayer : Object
8{
9 public Color color;
10 public signal void start_turn ();
11 public signal bool do_move (string move, bool apply);
12 public signal void do_undo ();
13 public signal bool do_resign ();
14 public signal bool do_claim_draw ();
15
16 public ChessPlayer (Color color)
17 {
18 this.color = color;
19 }
20
21 public bool move (string move, bool apply = true)
22 {
23 return do_move (move, apply);
24 }
25
26 public bool move_with_coords (int r0, int f0, int r1, int f1, bool apply = true)
27 {
28 string move = "%c%d%c%d".printf ('a' + f0, r0 + 1, 'a' + f1, r1 + 1);
29 return do_move (move, apply);
30 }
31
32 public void undo ()
33 {
34 do_undo ();
35 }
36
37 public bool resign ()
38 {
39 return do_resign ();
40 }
41
42 public bool claim_draw ()
43 {
44 return do_claim_draw ();
45 }
46}
47
48public enum PieceType
49{
50 PAWN,
51 ROOK,
52 KNIGHT,
53 BISHOP,
54 QUEEN,
55 KING
56}
57
58public class ChessPiece
59{
60 public ChessPlayer player;
61 public PieceType type;
62
63 public signal void moved ();
64 public signal void promoted ();
65 public signal void died ();
66
67 public Color color
68 {
69 get { return player.color; }
70 }
71
72 public unichar symbol
73 {
74 get
75 {
76 unichar c = ' ';
77 switch (type)
78 {
79 case PieceType.PAWN:
80 c = 'p';
81 break;
82 case PieceType.ROOK:
83 c = 'r';
84 break;
85 case PieceType.KNIGHT:
86 c = 'k';
87 break;
88 case PieceType.BISHOP:
89 c = 'b';
90 break;
91 case PieceType.QUEEN:
92 c = 'q';
93 break;
94 case PieceType.KING:
95 c = 'k';
96 break;
97 }
98 if (player.color == Color.WHITE)
99 c = c.toupper ();
100 return c;
101 }
102 }
103
104 public ChessPiece (ChessPlayer player, PieceType type)
105 {
106 this.player = player;
107 this.type = type;
108 }
109}
110
111public enum CheckState
112{
113 NONE,
114 CHECK,
115 CHECKMATE
116}
117
118public class ChessMove
119{
120 public int number;
121 public ChessPiece piece;
122 public ChessPiece? promotion_piece;
123 public ChessPiece? moved_rook;
124 public ChessPiece? victim;
125 public int r0;
126 public int f0;
127 public int r1;
128 public int f1;
129 public bool ambiguous_rank;
130 public bool ambiguous_file;
131 public CheckState check_state;
132
133 public string get_lan ()
134 {
135 if (moved_rook != null)
136 {
137 if (f1 > f0)
138 return "O-O";
139 else
140 return "O-O-O";
141 }
142
143 var builder = new StringBuilder ();
144 if (victim != null)
145 builder.append_printf ("%c%dx%c%d", 'a' + f0, r0 + 1, 'a' + f1, r1 + 1);
146 else
147 builder.append_printf ("%c%d-%c%d", 'a' + f0, r0 + 1, 'a' + f1, r1 + 1);
148
149 const char promotion_symbols[] = {' ', 'R', 'N', 'B', 'Q', 'K'};
150 if (promotion_piece != null)
151 builder.append_printf ("=%c", promotion_symbols[promotion_piece.type]);
152
153 switch (check_state)
154 {
155 case CheckState.CHECK:
156 builder.append_c ('+');
157 break;
158 case CheckState.CHECKMATE:
159 builder.append_c ('#');
160 break;
161 }
162
163 return builder.str;
164 }
165
166 public string get_san ()
167 {
168 const string piece_names[] = {"", "R", "N", "B", "Q", "K"};
169 return make_san ((string[]) piece_names);
170 }
171
172 public string get_fan ()
173 {
174 const string white_piece_names[] = {"", "♞", "♝", "♜", "♛", "♚"};
175 const string black_piece_names[] = {"", "♘", "♗", "♖", "♕", "♔"};
176 if (piece.color == Color.WHITE)
177 return make_san ((string[]) white_piece_names);
178 else
179 return make_san ((string[]) black_piece_names);
180 }
181
182 private string make_san (string[] piece_names)
183 {
184 if (moved_rook != null)
185 {
186 if (f1 > f0)
187 return "O-O";
188 else
189 return "O-O-O";
190 }
191
192 var builder = new StringBuilder ();
193 builder.append (piece_names[piece.type]);
194 if (ambiguous_file)
195 builder.append_printf ("%c", 'a' + f0);
196 if (ambiguous_rank)
197 builder.append_printf ("%d", r0 + 1);
198 if (victim != null)
199 builder.append ("x");
200 builder.append_printf ("%c%d", 'a' + f1, r1 + 1);
201
202 if (promotion_piece != null)
203 builder.append_printf ("=%s", piece_names[promotion_piece.type]);
204
205 switch (check_state)
206 {
207 case CheckState.CHECK:
208 builder.append_c ('+');
209 break;
210 case CheckState.CHECKMATE:
211 builder.append_c ('#');
212 break;
213 }
214
215 return builder.str;
216 }
217
218 /* Move suitable for a chess engine (CECP/UCI) */
219 public string get_engine ()
220 {
221 var builder = new StringBuilder ();
222 const char promotion_symbols[] = {' ', 'r', 'n', 'b', 'q', ' '};
223 if (promotion_piece != null)
224 builder.append_printf ("%c%d%c%d%c", 'a' + f0, r0 + 1, 'a' + f1, r1 + 1, promotion_symbols[promotion_piece.type]);
225 else
226 builder.append_printf ("%c%d%c%d", 'a' + f0, r0 + 1, 'a' + f1, r1 + 1);
227 return builder.str;
228 }
229
230 public ChessMove copy ()
231 {
232 var move = new ChessMove ();
233 move.number = number;
234 move.piece = piece;
235 move.promotion_piece = promotion_piece;
236 move.moved_rook = moved_rook;
237 move.victim = victim;
238 move.r0 = r0;
239 move.f0 = f0;
240 move.r1 = r1;
241 move.f1 = f1;
242 move.ambiguous_rank = ambiguous_rank;
243 move.ambiguous_file = ambiguous_file;
244 move.check_state = check_state;
245 return move;
246 }
247}
248
249public class ChessState
250{
251 public int number = 0;
252 public ChessPlayer players[2];
253 public ChessPlayer current_player;
254 public ChessPlayer opponent
255 {
256 get { return current_player.color == Color.WHITE ? players[Color.BLACK] : players[Color.WHITE]; }
257 }
258 public bool can_castle_kingside[2];
259 public bool can_castle_queenside[2];
260 public int en_passant_index = -1;
261 public CheckState check_state;
262 public int halfmove_clock;
263
264 public ChessPiece board[64];
265 public ChessMove? last_move = null;
266
267 /* Bitmap of all the pieces */
268 private int64 piece_masks[2];
269
270 private ChessState.empty ()
271 {
272 }
273
274 public ChessState (string fen)
275 {
276 players[Color.WHITE] = new ChessPlayer (Color.WHITE);
277 players[Color.BLACK] = new ChessPlayer (Color.BLACK);
278 for (int i = 0; i < 64; i++)
279 board[i] = null;
280
281 string[] fields = fen.split (" ");
282 //if (fields.length != 6)
283 // throw new Error ("Invalid FEN string");
284
285 /* Field 1: Piece placement */
286 string[] ranks = fields[0].split ("/");
287 //if (ranks.length != 8)
288 // throw new Error ("Invalid piece placement");
289 for (int rank = 0; rank < 8; rank++)
290 {
291 var rank_string = ranks[7 - rank];
292 for (int file = 0, offset = 0; file < 8 && offset < rank_string.length; offset++)
293 {
294 var c = rank_string[offset];
295 if (c >= '1' && c <= '8')
296 {
297 file += c - '0';
298 continue;
299 }
300
301 PieceType type;
302 var color = c.isupper () ? Color.WHITE : Color.BLACK;
303 if (!decode_piece_type (c.toupper (), out type))
304 ;//throw new Error ("");
305
306 int index = get_index (rank, file);
307 ChessPiece piece = new ChessPiece (players[color], type);
308 board[index] = piece;
309 int64 mask = BitBoard.set_location_masks[index];
310 piece_masks[color] |= mask;
311 file++;
312 }
313 }
314
315 /* Field 2: Active color */
316 if (fields[1] == "w")
317 current_player = players[Color.WHITE];
318 else if (fields[1] == "b")
319 current_player = players[Color.BLACK];
320 //else
321 // throw new Error ("Unknown active color: %s", fields[1]);
322
323 /* Field 3: Castling availability */
324 if (fields[2] != "-")
325 {
326 for (int i = 0; i < fields[2].length; i++)
327 {
328 var c = fields[2][i];
329 if (c == 'K')
330 can_castle_kingside[Color.WHITE] = true;
331 else if (c == 'Q')
332 can_castle_queenside[Color.WHITE] = true;
333 else if (c == 'k')
334 can_castle_kingside[Color.BLACK] = true;
335 else if (c == 'q')
336 can_castle_queenside[Color.BLACK] = true;
337 //else
338 // throw new Error ("");
339 }
340 }
341
342 /* Field 4: En passant target square */
343 if (fields[3] != "-")
344 {
345 //if (fields[3].length != 2)
346 // throw new Error ("");
347 en_passant_index = get_index (fields[3][1] - '1', fields[3][0] - 'a');
348 }
349
350 /* Field 5: Halfmove clock */
351 halfmove_clock = int.parse (fields[4]);
352
353 /* Field 6: Fullmove number */
354 number = (int.parse (fields[5]) - 1) * 2;
355 if (current_player.color == Color.BLACK)
356 number++;
357
358 check_state = get_check_state (current_player);
359 }
360
361 public ChessState copy ()
362 {
363 ChessState state = new ChessState.empty ();
364
365 state.number = number;
366 state.players[Color.WHITE] = players[Color.WHITE];
367 state.players[Color.BLACK] = players[Color.BLACK];
368 state.current_player = current_player;
369 state.can_castle_kingside[Color.WHITE] = can_castle_kingside[Color.WHITE];
370 state.can_castle_queenside[Color.WHITE] = can_castle_queenside[Color.WHITE];
371 state.can_castle_kingside[Color.BLACK] = can_castle_kingside[Color.BLACK];
372 state.can_castle_queenside[Color.BLACK] = can_castle_queenside[Color.BLACK];
373 state.en_passant_index = en_passant_index;
374 state.check_state = check_state;
375 if (last_move != null)
376 state.last_move = last_move.copy();
377 for (int i = 0; i < 64; i++)
378 state.board[i] = board[i];
379 state.piece_masks[Color.WHITE] = piece_masks[Color.WHITE];
380 state.piece_masks[Color.BLACK] = piece_masks[Color.BLACK];
381
382 return state;
383 }
384
385 public bool equals (ChessState state)
386 {
387 /* Check first if there is the same layout of pieces (unlikely),
388 * then the move castling and en-passant state are the same,
389 * then finally that it is the same move */
390 if (piece_masks[Color.WHITE] != state.piece_masks[Color.WHITE] ||
391 piece_masks[Color.BLACK] != state.piece_masks[Color.BLACK] ||
392 can_castle_kingside[Color.WHITE] != state.can_castle_kingside[Color.WHITE] ||
393 can_castle_queenside[Color.WHITE] != state.can_castle_queenside[Color.WHITE] ||
394 can_castle_kingside[Color.BLACK] != state.can_castle_kingside[Color.BLACK] ||
395 can_castle_queenside[Color.BLACK] != state.can_castle_queenside[Color.BLACK] ||
396 en_passant_index != state.en_passant_index ||
397 (last_move != null) != (state.last_move != null) ||
398 last_move.piece.type != state.last_move.piece.type ||
399 last_move.r0 != state.last_move.r0 ||
400 last_move.f0 != state.last_move.f0 ||
401 last_move.r1 != state.last_move.r1 ||
402 last_move.f1 != state.last_move.f1)
403 return false;
404
405 /* Finally check the same piece types are present */
406 for (int i = 0; i < 64; i++)
407 {
408 if (board[i] != null && board[i].type != state.board[i].type)
409 return false;
410 }
411
412 return true;
413 }
414
415 public string get_fen ()
416 {
417 var value = new StringBuilder ();
418
419 for (int rank = 7; rank >= 0; rank--)
420 {
421 int skip_count = 0;
422 for (int file = 0; file < 8; file++)
423 {
424 var p = board[get_index (rank, file)];
425 if (p == null)
426 skip_count++;
427 else
428 {
429 if (skip_count > 0)
430 {
431 value.append_printf ("%d", skip_count);
432 skip_count = 0;
433 }
434 value.append_printf ("%c", (int) p.symbol);
435 }
436 }
437 if (skip_count > 0)
438 value.append_printf ("%d", skip_count);
439 if (rank != 0)
440 value.append_c ('/');
441 }
442
443 value.append_c (' ');
444 if (current_player.color == Color.WHITE)
445 value.append_c ('w');
446 else
447 value.append_c ('b');
448
449 value.append_c (' ');
450 if (can_castle_kingside[Color.WHITE])
451 value.append_c ('K');
452 if (can_castle_queenside[Color.WHITE])
453 value.append_c ('Q');
454 if (can_castle_kingside[Color.BLACK])
455 value.append_c ('k');
456 if (can_castle_queenside[Color.BLACK])
457 value.append_c ('q');
458 if (!(can_castle_kingside[Color.WHITE] | can_castle_queenside[Color.WHITE] | can_castle_kingside[Color.BLACK] | can_castle_queenside[Color.BLACK]))
459 value.append_c ('-');
460
461 value.append_c (' ');
462 if (en_passant_index >= 0)
463 value.append_printf ("%c%d", 'a' + get_file (en_passant_index), get_rank (en_passant_index) + 1);
464 else
465 value.append_c ('-');
466
467 value.append_c (' ');
468 value.append_printf ("%d", halfmove_clock);
469
470 value.append_c (' ');
471 if (current_player.color == Color.WHITE)
472 value.append_printf ("%d", number / 2);
473 else
474 value.append_printf ("%d", number / 2 + 1);
475
476 return value.str;
477 }
478
479 public int get_index (int rank, int file)
480 {
481 return rank * 8 + file;
482 }
483
484 public int get_rank (int index)
485 {
486 return index / 8;
487 }
488
489 public int get_file (int index)
490 {
491 return index % 8;
492 }
493
494 public bool move (string move, bool apply = true)
495 {
496 int r0, f0, r1, f1;
497 PieceType promotion_type;
498
499 if (!decode_move (current_player, move, out r0, out f0, out r1, out f1, out promotion_type))
500 return false;
501
502 if (!move_with_coords (current_player, r0, f0, r1, f1, promotion_type, apply))
503 return false;
504
505 return true;
506 }
507
508 public bool move_with_coords (ChessPlayer player,
509 int r0, int f0, int r1, int f1,
510 PieceType promotion_type = PieceType.QUEEN,
511 bool apply = true, bool test_check = true)
512 {
513 // FIXME: Make this use indexes to be faster
514 var start = get_index (r0, f0);
515 var end = get_index (r1, f1);
516
517 var color = player.color;
518 var opponent_color = color == Color.WHITE ? Color.BLACK : Color.WHITE;
519
520 /* Must be moving own piece */
521 var piece = board[start];
522 if (piece == null || piece.player != player)
523 return false;
524
525 /* Check valid move */
526 int64 end_mask = BitBoard.set_location_masks[end];
527 int64 move_mask = BitBoard.move_masks[color * 64*6 + piece.type * 64 + start];
528 if ((end_mask & move_mask) == 0)
529 return false;
530
531 /* Check no pieces in the way */
532 int64 over_mask = BitBoard.over_masks[start * 64 + end];
533 if ((over_mask & (piece_masks[Color.WHITE] | piece_masks[Color.BLACK])) != 0)
534 return false;
535
536 /* Get victim of move */
537 var victim = board[end];
538 var victim_index = end;
539
540 /* Can't take own pieces */
541 if (victim != null && victim.player == player)
542 return false;
543
544 /* Check special moves */
545 int rook_start = -1, rook_end = -1;
546 bool is_promotion = false;
547 bool ambiguous_rank = false;
548 bool ambiguous_file = false;
549 switch (piece.type)
550 {
551 case PieceType.PAWN:
552 /* Check if taking an marched pawn */
553 if (victim == null && end == en_passant_index)
554 {
555 victim_index = get_index (r1 == 2 ? 3 : 4, f1);
556 victim = board[victim_index];
557 }
558
559 /* If moving diagonally there must be a victim */
560 if (f0 != f1)
561 {
562 if (victim == null)
563 return false;
564 }
565 else
566 {
567 /* If moving forward can't take enemy */
568 if (victim != null)
569 return false;
570 }
571 is_promotion = r1 == 0 || r1 == 7;
572
573 /* Always show the file of a pawn capturing */
574 if (victim != null)
575 ambiguous_file = true;
576 break;
577 case PieceType.KING:
578 /* If moving more than one square must be castling */
579 if ((f0 - f1).abs () > 1)
580 {
581 /* File the rook is on */
582 rook_start = get_index (r0, f1 > f0 ? 7 : 0);
583 rook_end = get_index (r0, f1 > f0 ? f1 - 1 : f1 + 1);
584
585 /* Check if can castle */
586 if (f1 > f0)
587 {
588 if (!can_castle_kingside[color])
589 return false;
590 }
591 else
592 {
593 if (!can_castle_queenside[color])
594 return false;
595 }
596
597 var rook = board[rook_start];
598 if (rook == null)
599 return false;
600
601 /* Check rook can move */
602 int64 rook_over_mask = BitBoard.over_masks[rook_start * 64 + rook_end];
603 if ((rook_over_mask & (piece_masks[Color.WHITE] | piece_masks[Color.BLACK])) != 0)
604 return false;
605
606 /* Can't castle when in check */
607 if (check_state == CheckState.CHECK)
608 return false;
609
610 /* Square moved across can't be under attack */
611 for (int i = 0; i < 64; i++)
612 {
613 if (move_with_coords (opponent, get_rank (i), get_file (i), get_rank (rook_end), get_file (rook_end), PieceType.QUEEN, false, false))
614 return false;
615 }
616 }
617 break;
618 default:
619 break;
620 }
621
622 if (!apply && !test_check)
623 return true;
624
625 /* Check if other pieces of the same type can make this move - this is required for SAN notation */
626 if (apply)
627 {
628 for (int i = 0; i < 64; i++)
629 {
630 /* Ignore our move */
631 if (i == start)
632 continue;
633
634 /* Check for a friendly piece of the same type */
635 var p = board[i];
636 if (p == null || p.player != player || p.type != piece.type)
637 continue;
638
639 /* If more than one piece can move then the rank and/or file are ambiguous */
640 var r = get_rank (i);
641 var f = get_file (i);
642 if (move_with_coords (player, r, f, r1, f1, PieceType.QUEEN, false))
643 {
644 if (r != r0)
645 ambiguous_rank = true;
646 if (f != f0)
647 ambiguous_file = true;
648 }
649 }
650 }
651
652 var old_white_mask = piece_masks[Color.WHITE];
653 var old_black_mask = piece_masks[Color.BLACK];
654 var old_white_can_castle_kingside = can_castle_kingside[Color.WHITE];
655 var old_white_can_castle_queenside = can_castle_queenside[Color.WHITE];
656 var old_black_can_castle_kingside = can_castle_kingside[Color.BLACK];
657 var old_black_can_castle_queenside = can_castle_queenside[Color.BLACK];
658 var old_en_passant_index = en_passant_index;
659 var old_halfmove_clock = halfmove_clock;
660
661 /* Update board */
662 board[start] = null;
663 piece_masks[Color.WHITE] &= BitBoard.clear_location_masks[start];
664 piece_masks[Color.BLACK] &= BitBoard.clear_location_masks[start];
665 if (victim != null)
666 {
667 board[victim_index] = null;
668 piece_masks[Color.WHITE] &= BitBoard.clear_location_masks[victim_index];
669 piece_masks[Color.BLACK] &= BitBoard.clear_location_masks[victim_index];
670 }
671 if (is_promotion)
672 board[end] = new ChessPiece (player, promotion_type);
673 else
674 board[end] = piece;
675 piece_masks[color] |= end_mask;
676 piece_masks[opponent_color] &= BitBoard.clear_location_masks[end];
677 if (rook_start >= 0)
678 {
679 var rook = board[rook_start];
680 board[rook_start] = null;
681 piece_masks[color] &= BitBoard.clear_location_masks[rook_start];
682 board[rook_end] = rook;
683 piece_masks[color] |= BitBoard.set_location_masks[rook_end];
684 }
685
686 /* Can't castle once king has moved */
687 if (piece.type == PieceType.KING)
688 {
689 can_castle_kingside[color] = false;
690 can_castle_queenside[color] = false;
691 }
692 /* Can't castle once rooks have moved */
693 else if (piece.type == PieceType.ROOK)
694 {
695 int base_rank = color == Color.WHITE ? 0 : 7;
696 if (r0 == base_rank)
697 {
698 if (f0 == 0)
699 can_castle_queenside[color] = false;
700 else if (f0 == 7)
701 can_castle_kingside[color] = false;
702 }
703 }
704
705 /* Pawn square moved over is vulnerable */
706 if (piece.type == PieceType.PAWN && over_mask != 0)
707 en_passant_index = get_index ((r0 + r1) / 2, f0);
708 else
709 en_passant_index = -1;
710
711 /* Reset halfmove count when pawn moved or piece taken */
712 if (piece.type == PieceType.PAWN || victim != null)
713 halfmove_clock = 0;
714 else
715 halfmove_clock++;
716
717 /* Test if this move would leave that player in check */
718 bool result = true;
719 if (test_check && is_in_check (player))
720 result = false;
721
722 /* Undo move */
723 if (!apply || !result)
724 {
725 board[start] = piece;
726 board[end] = null;
727 if (victim != null)
728 board[victim_index] = victim;
729 if (rook_start >= 0)
730 {
731 var rook = board[rook_end];
732 board[rook_start] = rook;
733 board[rook_end] = null;
734 }
735 piece_masks[Color.WHITE] = old_white_mask;
736 piece_masks[Color.BLACK] = old_black_mask;
737 can_castle_kingside[Color.WHITE] = old_white_can_castle_kingside;
738 can_castle_queenside[Color.WHITE] = old_white_can_castle_queenside;
739 can_castle_kingside[Color.BLACK] = old_black_can_castle_kingside;
740 can_castle_queenside[Color.BLACK] = old_black_can_castle_queenside;
741 en_passant_index = old_en_passant_index;
742 halfmove_clock = old_halfmove_clock;
743
744 return result;
745 }
746
747 current_player = color == Color.WHITE ? players[Color.BLACK] : players[Color.WHITE];
748 check_state = get_check_state (current_player);
749
750 last_move = new ChessMove ();
751 last_move.number = number;
752 last_move.piece = piece;
753 if (is_promotion)
754 last_move.promotion_piece = board[end];
755 last_move.victim = victim;
756 if (rook_end >= 0)
757 last_move.moved_rook = board[rook_end];
758 last_move.r0 = r0;
759 last_move.f0 = f0;
760 last_move.r1 = r1;
761 last_move.f1 = f1;
762 last_move.ambiguous_rank = ambiguous_rank;
763 last_move.ambiguous_file = ambiguous_file;
764 last_move.check_state = check_state;
765
766 return true;
767 }
768
769 public ChessResult get_result (out ChessRule rule)
770 {
771 rule = ChessRule.CHECKMATE;
772 if (check_state == CheckState.CHECKMATE)
773 {
774 if (current_player.color == Color.WHITE)
775 {
776 rule = ChessRule.CHECKMATE;
777 return ChessResult.BLACK_WON;
778 }
779 else
780 {
781 rule = ChessRule.CHECKMATE;
782 return ChessResult.WHITE_WON;
783 }
784 }
785
786 if (!can_move (current_player))
787 {
788 rule = ChessRule.STALEMATE;
789 return ChessResult.DRAW;
790 }
791
792 if (last_move != null && last_move.victim != null && !have_sufficient_material ())
793 {
794 rule = ChessRule.INSUFFICIENT_MATERIAL;
795 return ChessResult.DRAW;
796 }
797
798 return ChessResult.IN_PROGRESS;
799 }
800
801 private CheckState get_check_state (ChessPlayer player)
802 {
803 if (is_in_check (player))
804 {
805 if (is_in_checkmate (player))
806 return CheckState.CHECKMATE;
807 else
808 return CheckState.CHECK;
809 }
810 return CheckState.NONE;
811 }
812
813 private bool is_in_check (ChessPlayer player)
814 {
815 var opponent = player.color == Color.WHITE ? players[Color.BLACK] : players[Color.WHITE];
816
817 /* Is in check if any piece can take the king */
818 for (int king_index = 0; king_index < 64; king_index++)
819 {
820 var p = board[king_index];
821 if (p != null && p.player == player && p.type == PieceType.KING)
822 {
823 /* See if any enemy pieces can take the king */
824 for (int start = 0; start < 64; start++)
825 {
826 if (move_with_coords (opponent,
827 get_rank (start), get_file (start),
828 get_rank (king_index), get_file (king_index),
829 PieceType.QUEEN, false, false))
830 return true;
831 }
832 }
833 }
834
835 return false;
836 }
837
838 private bool is_in_checkmate (ChessPlayer player)
839 {
840 /* Is in checkmate if no pieces can move */
841 for (int piece_index = 0; piece_index < 64; piece_index++)
842 {
843 var p = board[piece_index];
844 if (p != null && p.player == player)
845 {
846 for (int end = 0; end < 64; end++)
847 {
848 if (move_with_coords (player,
849 get_rank (piece_index), get_file (piece_index),
850 get_rank (end), get_file (end),
851 PieceType.QUEEN, false, true))
852 return false;
853 }
854 }
855 }
856
857 return true;
858 }
859
860 private bool can_move (ChessPlayer player)
861 {
862 bool have_pieces = false;
863
864 for (int start = 0; start < 64; start++)
865 {
866 var p = board[start];
867 if (p != null && p.player == player)
868 {
869 have_pieces = true;
870
871 /* See if can move anywhere */
872 for (int end = 0; end < 64; end++)
873 {
874 if (move_with_coords (player,
875 get_rank (start), get_file (start),
876 get_rank (end), get_file (end),
877 PieceType.QUEEN, false, true))
878 return true;
879 }
880 }
881 }
882
883 /* Only mark as stalemate if have at least one piece */
884 if (have_pieces)
885 return false;
886 else
887 return true;
888 }
889
890 public bool have_sufficient_material ()
891 {
892 var white_knight_count = 0;
893 var white_bishop_count = 0;
894 var white_bishop_on_white_square = false;
895 var white_bishop_on_black_square = false;
896 var black_knight_count = 0;
897 var black_bishop_count = 0;
898 var black_bishop_on_white_square = false;
899 var black_bishop_on_black_square = false;
900
901 for (int i = 0; i < 64; i++)
902 {
903 var p = board[i];
904 if (p == null)
905 continue;
906
907 /* Any pawns, rooks or queens can perform checkmate */
908 if (p.type == PieceType.PAWN || p.type == PieceType.ROOK || p.type == PieceType.QUEEN)
909 return true;
910
911 /* Otherwise, count the minor pieces for each colour... */
912 if (p.type == PieceType.KNIGHT)
913 {
914 if (p.color == Color.WHITE)
915 white_knight_count++;
916 else
917 black_knight_count++;
918 }
919
920 if (p.type == PieceType.BISHOP)
921 {
922 var color = Color.BLACK;
923 if ((i + i/8) % 2 != 0)
924 color = Color.WHITE;
925
926 if (p.color == Color.WHITE)
927 {
928 if (color == Color.WHITE)
929 white_bishop_on_white_square = true;
930 else
931 white_bishop_on_black_square = true;
932 white_bishop_count++;
933 }
934 else
935 {
936 if (color == Color.WHITE)
937 black_bishop_on_white_square = true;
938 else
939 black_bishop_on_black_square = true;
940 black_bishop_count++;
941 }
942 }
943
944 /* Three knights versus king can checkmate */
945 if (white_knight_count > 2 || black_knight_count > 2)
946 return true;
947
948 /* Bishop and knight versus king can checkmate */
949 if (white_bishop_count > 0 && white_knight_count > 0)
950 return true;
951 if (black_bishop_count > 0 && black_knight_count > 0)
952 return true;
953
954 /* King and bishops versus king can checkmate as long as the bishops are on both colours */
955 if (white_bishop_on_white_square && white_bishop_on_black_square)
956 return true;
957 if (black_bishop_on_white_square && black_bishop_on_black_square)
958 return true;
959 }
960
961 return false;
962 }
963
964 private bool decode_piece_type (unichar c, out PieceType type)
965 {
966 type = PieceType.PAWN;
967 switch (c)
968 {
969 case 'P':
970 type = PieceType.PAWN;
971 return true;
972 case 'R':
973 type = PieceType.ROOK;
974 return true;
975 case 'N':
976 type = PieceType.KNIGHT;
977 return true;
978 case 'B':
979 type = PieceType.BISHOP;
980 return true;
981 case 'Q':
982 type = PieceType.QUEEN;
983 return true;
984 case 'K':
985 type = PieceType.KING;
986 return true;
987 default:
988 return false;
989 }
990 }
991
992 private bool decode_move (ChessPlayer player, string move, out int r0, out int f0, out int r1, out int f1, out PieceType promotion_type)
993 {
994 int i = 0;
995
996 promotion_type = PieceType.QUEEN;
997 if (move.has_prefix ("O-O-O"))
998 {
999 if (player.color == Color.WHITE)
1000 r0 = r1 = 0;
1001 else
1002 r0 = r1 = 7;
1003 f0 = 4;
1004 f1 = 2;
1005 i += (int) "O-O-O".length;
1006 }
1007 else if (move.has_prefix ("O-O"))
1008 {
1009 if (player.color == Color.WHITE)
1010 r0 = r1 = 0;
1011 else
1012 r0 = r1 = 7;
1013 f0 = 4;
1014 f1 = 6;
1015 i += (int) "O-O".length;
1016 }
1017 else
1018 {
1019 PieceType type = PieceType.PAWN;
1020 if (decode_piece_type (move[i], out type))
1021 i++;
1022
1023 r0 = f0 = r1 = f1 = -1;
1024 if (move[i] >= 'a' && move[i] <= 'h')
1025 {
1026 f1 = (int) (move[i] - 'a');
1027 i++;
1028 }
1029 if (move[i] >= '1' && move[i] <= '8')
1030 {
1031 r1 = (int) (move[i] - '1');
1032 i++;
1033 }
1034 if (move[i] == 'x')
1035 i++;
1036 if (move[i] >= 'a' && move[i] <= 'h')
1037 {
1038 f0 = f1;
1039 f1 = (int) (move[i] - 'a');
1040 i++;
1041 }
1042 if (move[i] >= '1' && move[i] <= '8')
1043 {
1044 r0 = r1;
1045 r1 = (int) (move[i] - '1');
1046 i++;
1047 }
1048 if (move[i] == '=')
1049 {
1050 i++;
1051 if (decode_piece_type (move[i], out promotion_type))
1052 i++;
1053 }
1054 else if (move[i] != '\0')
1055 {
1056 switch (move[i])
1057 {
1058 case 'q':
1059 promotion_type = PieceType.QUEEN;
1060 i++;
1061 break;
1062 case 'n':
1063 promotion_type = PieceType.KNIGHT;
1064 i++;
1065 break;
1066 case 'r':
1067 promotion_type = PieceType.ROOK;
1068 i++;
1069 break;
1070 case 'b':
1071 promotion_type = PieceType.BISHOP;
1072 i++;
1073 break;
1074 }
1075 }
1076
1077 /* Don't have a destination to move to */
1078 if (r1 < 0 || f1 < 0)
1079 {
1080 debug ("Move %s missing destination", move);
1081 return false;
1082 }
1083
1084 /* Find source piece */
1085 if (r0 < 0 || f0 < 0)
1086 {
1087 int match_rank = -1, match_file = -1;
1088
1089 for (int file = 0; file < 8; file++)
1090 {
1091 if (f0 >= 0 && file != f0)
1092 continue;
1093
1094 for (int rank = 0; rank < 8; rank++)
1095 {
1096 if (r0 >= 0 && rank != r0)
1097 continue;
1098
1099 /* Only check this players pieces of the correct type */
1100 var piece = board[get_index (rank, file)];
1101 if (piece == null || piece.type != type || piece.player != player)
1102 continue;
1103
1104 /* See if can move here */
1105 if (!this.move_with_coords (player, rank, file, r1, f1, PieceType.QUEEN, false))
1106 continue;
1107
1108 /* Duplicate match */
1109 if (match_rank >= 0)
1110 {
1111 debug ("Move %s is ambiguous", move);
1112 return false;
1113 }
1114
1115 match_rank = rank;
1116 match_file = file;
1117 }
1118 }
1119
1120 if (match_rank < 0)
1121 {
1122 debug ("Move %s has no matches", move);
1123 return false;
1124 }
1125
1126 r0 = match_rank;
1127 f0 = match_file;
1128 }
1129 }
1130
1131 if (move[i] == '+')
1132 i++;
1133 else if (move[i] == '#')
1134 i++;
1135
1136 if (move[i] != '\0')
1137 {
1138 debug ("Move %s has unexpected characters", move);
1139 return false;
1140 }
1141
1142 return true;
1143 }
1144}
1145
1146public enum ChessResult
1147{
1148 IN_PROGRESS,
1149 WHITE_WON,
1150 BLACK_WON,
1151 DRAW
1152}
1153
1154public enum ChessRule
1155{
1156 CHECKMATE,
1157 STALEMATE,
1158 FIFTY_MOVES,
1159 TIMEOUT,
1160 THREE_FOLD_REPETITION,
1161 INSUFFICIENT_MATERIAL,
1162 RESIGN,
1163 ABANDONMENT,
1164 DEATH
1165}
1166
1167public class ChessGame
1168{
1169 public bool is_started;
1170 public ChessResult result;
1171 public ChessRule rule;
1172 public List<ChessState> move_stack;
1173
1174 private int hold_count = 0;
1175
1176 public const string STANDARD_SETUP = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
1177
1178 public signal void started ();
1179 public signal void turn_started (ChessPlayer player);
1180 public signal void moved (ChessMove move);
1181 public signal void undo ();
1182 public signal void ended ();
1183
1184 public ChessState current_state
1185 {
1186 get { return move_stack.data; }
1187 }
1188
1189 public ChessPlayer white
1190 {
1191 get { return current_state.players[Color.WHITE]; }
1192 }
1193 public ChessPlayer black
1194 {
1195 get { return current_state.players[Color.BLACK]; }
1196 }
1197 public ChessPlayer current_player
1198 {
1199 get { return current_state.current_player; }
1200 }
1201 public ChessPlayer opponent
1202 {
1203 get { return current_state.opponent; }
1204 }
1205 private ChessClock? _clock;
1206 public ChessClock? clock
1207 {
1208 get { return _clock; }
1209 set
1210 {
1211 if (is_started)
1212 return;
1213 _clock = value;
1214 }
1215 }
1216
1217 public ChessGame (string fen = STANDARD_SETUP, string[]? moves = null)
1218 {
1219 is_started = false;
1220 move_stack.prepend (new ChessState (fen));
1221 result = ChessResult.IN_PROGRESS;
1222
1223 if (moves != null)
1224 {
1225 for (var i = 0; i < moves.length; i++)
1226 {
1227 if (!do_move (current_player, moves[i], true))
1228 warning ("Invalid move %s", moves[i]);
1229 }
1230 }
1231
1232 white.do_move.connect (move_cb);
1233 white.do_undo.connect (undo_cb);
1234 white.do_resign.connect (resign_cb);
1235 white.do_claim_draw.connect (claim_draw_cb);
1236 black.do_move.connect (move_cb);
1237 black.do_undo.connect (undo_cb);
1238 black.do_resign.connect (resign_cb);
1239 black.do_claim_draw.connect (claim_draw_cb);
1240 }
1241
1242 private bool move_cb (ChessPlayer player, string move, bool apply)
1243 {
1244 if (!is_started)
1245 return false;
1246
1247 return do_move (player, move, apply);
1248 }
1249
1250 private bool do_move (ChessPlayer player, string? move, bool apply)
1251 {
1252 if (player != current_player)
1253 return false;
1254
1255 var state = current_state.copy ();
1256 state.number++;
1257 if (!state.move (move, apply))
1258 return false;
1259
1260 if (!apply)
1261 return true;
1262
1263 move_stack.prepend (state);
1264 if (state.last_move.victim != null)
1265 state.last_move.victim.died ();
1266 state.last_move.piece.moved ();
1267 if (state.last_move.moved_rook != null)
1268 state.last_move.moved_rook.moved ();
1269 moved (state.last_move);
1270 complete_move ();
1271
1272 return true;
1273 }
1274
1275 public void add_hold ()
1276 {
1277 hold_count++;
1278 }
1279
1280 public void remove_hold ()
1281 {
1282 return_if_fail (hold_count > 0);
1283
1284 hold_count--;
1285 if (hold_count == 0)
1286 complete_move ();
1287 }
1288
1289 private void complete_move ()
1290 {
1291 /* Wait until the hold is removed */
1292 if (hold_count > 0)
1293 return;
1294
1295 ChessRule rule;
1296 var result = current_state.get_result (out rule);
1297 if (result != ChessResult.IN_PROGRESS)
1298 {
1299 stop (result, rule);
1300 }
1301 else
1302 {
1303 if (_clock != null)
1304 _clock.active_color = current_player.color;
1305 current_player.start_turn ();
1306 turn_started (current_player);
1307 }
1308 }
1309
1310 private void undo_cb (ChessPlayer player)
1311 {
1312 /* If this players turn undo their opponents move first */
1313 if (player == current_player)
1314 undo_cb (opponent);
1315
1316 /* Don't pop off starting move */
1317 if (move_stack.next == null)
1318 return;
1319
1320 /* Pop off the move state and notify */
1321 move_stack.remove_link (move_stack);
1322 undo ();
1323 }
1324
1325 private bool resign_cb (ChessPlayer player)
1326 {
1327 if (!is_started)
1328 return false;
1329
1330 if (player.color == Color.WHITE)
1331 stop (ChessResult.BLACK_WON, ChessRule.RESIGN);
1332 else
1333 stop (ChessResult.WHITE_WON, ChessRule.RESIGN);
1334
1335 return true;
1336 }
1337
1338 private bool claim_draw_cb (ChessPlayer player)
1339 {
1340 if (!is_started)
1341 return false;
1342
1343 if (current_state.halfmove_clock >= 100)
1344 stop (ChessResult.DRAW, ChessRule.FIFTY_MOVES);
1345 else if (is_three_fold_repeat ())
1346 stop (ChessResult.DRAW, ChessRule.THREE_FOLD_REPETITION);
1347 else
1348 return false;
1349
1350 return true;
1351 }
1352
1353 public void start ()
1354 {
1355 if (result != ChessResult.IN_PROGRESS)
1356 return;
1357
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: