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
1=== added directory '.pc/90_fix-help-links.patch'
2=== added directory '.pc/90_fix-help-links.patch/glchess'
3=== added directory '.pc/90_fix-help-links.patch/glchess/help'
4=== added directory '.pc/90_fix-help-links.patch/glchess/help/C'
5=== added file '.pc/90_fix-help-links.patch/glchess/help/C/glchess.xml'
6--- .pc/90_fix-help-links.patch/glchess/help/C/glchess.xml 1970-01-01 00:00:00 +0000
7+++ .pc/90_fix-help-links.patch/glchess/help/C/glchess.xml 2012-12-26 19:18:24 +0000
8@@ -0,0 +1,763 @@
9+<?xml version="1.0"?>
10+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
11+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
12+ <!ENTITY legal SYSTEM "legal.xml">
13+ <!ENTITY appversion "2.18">
14+ <!ENTITY manrevision "2.18">
15+ <!ENTITY date "December">
16+ <!ENTITY app "<application>Chess</application>">
17+ <!ENTITY appname "Chess">
18+ <!ENTITY version "2.22">
19+]>
20+
21+<!--
22+ (Do not remove this comment block.)
23+ Maintained by the GNOME Documentation Project
24+ http://developer.gnome.org/projects/gdp
25+ Template version: 2.0 beta
26+ Template last modified Feb 12, 2002
27+-->
28+
29+<!-- =============Document Header ============================= -->
30+<article id="index" lang="en">
31+<!-- please do not change the id; for translations, change lang to -->
32+<!-- appropriate code -->
33+<articleinfo>
34+ <title>&app; Manual</title>
35+
36+ <abstract role="description">
37+ <para>
38+ glChess is a game for playing the classic board game of chess,
39+ in which two players simulate a battle by capturing the opponents
40+ pieces and ultimately the king. It can be played in 2D or 3D mode,
41+ full screen or in a window.
42+ </para>
43+ </abstract>
44+ <copyright>
45+ <year>2006-2008</year>
46+ <holder>Andreas Røsdal</holder>
47+ </copyright>
48+<!-- translators: uncomment this:
49+
50+ <copyright>
51+ <year>2002</year>
52+ <holder>ME-THE-TRANSLATOR (Latin translation)</holder>
53+ </copyright>
54+
55+ -->
56+<!-- An address can be added to the publisher information. If a role is
57+ not specified, the publisher/author is the same for all versions of the
58+ document. -->
59+ <publisher role="maintainer">
60+ <publishername> GNOME Documentation Project </publishername>
61+ </publisher>
62+
63+ &legal;
64+ <!-- This file contains link to license for the documentation (GNU FDL), and
65+ other legal stuff such as "NO WARRANTY" statement. Please do not change
66+ any of this. -->
67+
68+ <authorgroup>
69+ <author>
70+ <firstname>Andreas</firstname>
71+ <surname>Røsdal</surname>
72+ <affiliation>
73+ <address> <email>andrearo@pvv.ntnu.no</email> </address>
74+ </affiliation>
75+ </author>
76+<!-- This is appropriate place for other contributors: translators,
77+ maintainers, etc. Commented out by default.
78+ <othercredit role="translator">
79+ <firstname>Latin</firstname>
80+ <surname>Translator 1</surname>
81+ <affiliation>
82+ <orgname>Latin Translation Team</orgname>
83+ <address> <email>translator@gnome.org</email> </address>
84+ </affiliation>
85+ <contrib>Latin translation</contrib>
86+ </othercredit>
87+-->
88+ </authorgroup>
89+
90+ <releaseinfo revision="2.26" role="review"/>
91+
92+<revhistory>
93+ <revision>
94+ <revnumber>&appname; Manual V&manrevision;</revnumber>
95+ <date>&date;</date>
96+ <revdescription>
97+ <para role="author">Andreas Røsdal
98+ <email>andrearo@pvv.ntnu.no</email>
99+ </para>
100+ <para role="publisher">GNOME Documentation Project</para>
101+ </revdescription>
102+ </revision>
103+ <revision>
104+ <revnumber>1</revnumber>
105+ <date>December 2006</date>
106+ <authorinitials>AR</authorinitials>
107+ <revremark>
108+ First draft completed.
109+ </revremark>
110+ </revision>
111+ </revhistory>
112+
113+ <releaseinfo>This manual describes version &appversion; of &appname;.
114+ </releaseinfo>
115+ <!-- The following feedback information only applies to appliactions
116+ listed in bugzilla.gnome.org and bugzilla.ximian.com. For other
117+ applications, please provide your own feedback info or remove thsi
118+ section altogether -->
119+ <legalnotice>
120+ <title>Feedback</title>
121+ <para>To report a bug or make a suggestion regarding the &app; application or
122+ this manual, follow the directions in the
123+ <ulink url="ghelp:user-guide?feedback-bugs"
124+ type="help">GNOME Feedback Page</ulink>.
125+ </para>
126+<!-- Translators may also add here feedback address for translations -->
127+ </legalnotice>
128+
129+</articleinfo>
130+
131+ <indexterm zone="index">
132+ <primary>glChess</primary>
133+ </indexterm>
134+
135+<!-- ============= Document Body ============================= -->
136+<!-- ============= Introduction ============================== -->
137+<sect1 id="intro">
138+ <title>Introduction</title>
139+ <sect2 id="what">
140+ <title>Overview of Chess</title>
141+
142+ <para>
143+ Chess is a two-player strategy board game. <application>glChess</application> is a 2D/3D chess game, where games
144+ can be played between a combination of human and computer players. glChess detects known third party chess engines
145+ for computer players. The game was originally developed by Robert Ancell, now the game is included in gnome-games.
146+ </para>
147+
148+ <para>
149+ <application>glChess</application> is written in Python and uses GTK+ and Cairo to render the chess board. 3D support is
150+ optionally available using OpenGl,
151+ using the Python OpenGL and GtkGLExt libraries. As with most modern 3D programs hardware acceleration is recommended but it should
152+ run OK in software. glChess is bundled with GNU Chess as the default chess AI. glChess can be played in network mode against
153+ other players on the Internet.
154+ </para>
155+ <para>
156+ 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.
157+</para>
158+<para>
159+The 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.
160+</para>
161+<para>
162+One 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.
163+</para>
164+
165+ <para>
166+ To run <application>glChess</application>, select
167+ <guimenuitem>Chess</guimenuitem> from the
168+ <guisubmenu>Games</guisubmenu> submenu of the <guimenu>Main
169+ Menu</guimenu>, or type <command>glchess</command> on the
170+ command line.
171+ </para>
172+ </sect2>
173+
174+</sect1>
175+
176+
177+<sect1 id="playing-glchess">
178+ <title>Playing glChess</title>
179+ <sect2 id="main-game-window">
180+<title>Main game window</title>
181+
182+ <para>
183+Starting glChess displays the main game window as shown below. The game is played
184+by moving chess pieces using the mouse. Each player alternates to move a piece in the appropriate
185+colour, from one board position to another valid board position.
186+The main game window is organized in three main areas: In the top menu and toolbar area,
187+most common game actions can be made. The chess board is in the middle of the window,
188+where the game is played by moving chess pieces using the mouse. Finally, the game
189+history panel is shown at the bottom, where information about the game history, the remaining
190+move time and buttons for showing previous or next moves are available.
191+</para>
192+
193+ <figure id="main-game-shot">
194+ <title>Main window in glChess</title>
195+ <screenshot>
196+ <mediaobject>
197+ <imageobject>
198+ <imagedata fileref="figures/game.png" format="PNG" srccredit="Andreas"/>
199+ </imageobject>
200+ <textobject>
201+ <phrase>Main window in glChess.</phrase>
202+ </textobject>
203+ </mediaobject>
204+ </screenshot>
205+ </figure>
206+</sect2>
207+
208+<sect2>
209+<title>Starting a new game</title>
210+<para>
211+To start a new game, press the <guibutton>New Game</guibutton> buttton on the toolbar.
212+The new game dialog is then shown, which allows you to setup a new game with the settings
213+of your choice. In the <interface>game properties</interface> section, the game name and time-limit for
214+each player's move is set. In the <interface>players</interface> section, it is possible to setup the
215+number of human and AI players. If you have installed any supported chess engines as AI players,
216+these will be displayed in the list of available players. Finally, the difficulty setting of the AI
217+players is set in the <interface>difficulty</interface> section.
218+</para>
219+
220+ <figure id="new-game-shot">
221+ <title>Start new game dialog</title>
222+ <screenshot>
223+ <mediaobject>
224+ <imageobject>
225+ <imagedata fileref="figures/new_game.png" format="PNG" srccredit="Andreas"/>
226+ </imageobject>
227+ <textobject>
228+ <phrase>Start new game dialog for glChess.</phrase>
229+ </textobject>
230+ </mediaobject>
231+ </screenshot>
232+ </figure>
233+
234+</sect2>
235+
236+
237+
238+
239+<sect2 id="menubar">
240+ <title>Menus</title>
241+ <para>
242+ The menu bar, located at the top of the <interface>Main
243+ Window</interface>, contains the following menus:
244+ </para>
245+
246+ <variablelist>
247+ <varlistentry>
248+ <term><guimenu>Game</guimenu></term>
249+ <listitem>
250+ <para>
251+ This menu contains:
252+ <itemizedlist>
253+ <listitem>
254+ <para>
255+ <menuchoice>
256+ <shortcut>
257+ <keysym>Ctrl+N</keysym>
258+ </shortcut>
259+ <guimenuitem>New</guimenuitem>
260+ </menuchoice>
261+ This starts a new game of <application>Chess</application>.
262+ </para>
263+ </listitem>
264+ <listitem>
265+ <para>
266+ <menuchoice>
267+ <shortcut>
268+ <keysym>Ctrl+O</keysym>
269+ </shortcut>
270+ <guimenuitem>Open</guimenuitem>
271+ </menuchoice>
272+ Loads a previously saved game.
273+ </para>
274+ </listitem>
275+ <listitem>
276+ <para>
277+ <menuchoice>
278+ <shortcut>
279+ <keysym>Ctrl+S</keysym>
280+ </shortcut>
281+ <guimenuitem>Save</guimenuitem>
282+ </menuchoice>
283+ Saves the current game of chess.
284+ </para>
285+ </listitem>
286+ <listitem>
287+ <para>
288+ <menuchoice>
289+ <guimenuitem>Save As</guimenuitem>
290+ </menuchoice>
291+ Saves the current game of chess with a new filename.
292+ </para>
293+ </listitem>
294+
295+ <listitem>
296+ <para>
297+ <menuchoice>
298+ <shortcut>
299+ <keysym>Ctrl+L</keysym>
300+ </shortcut>
301+ <guimenuitem>Network Game</guimenuitem>
302+ </menuchoice>
303+ This starts a network multiplayer game using GGZ Gaming Zone.
304+ </para>
305+ </listitem>
306+ <listitem>
307+ <para>
308+ <menuchoice>
309+ <guimenuitem>Resign</guimenuitem>
310+ </menuchoice>
311+ To concede loss of the game, so that the opponent wins the game.
312+ </para>
313+ </listitem>
314+ <listitem>
315+ <para>
316+ <menuchoice>
317+ <guimenuitem>Claim Draw</guimenuitem>
318+ </menuchoice>
319+ If a claimed draw is accepted, the game ends without victory for either player.
320+ </para>
321+ </listitem>
322+ <listitem>
323+ <para>
324+ <menuchoice>
325+ <shortcut>
326+ <keysym>Ctrl+Q</keysym>
327+ </shortcut>
328+ <guimenuitem>Quit</guimenuitem>
329+ </menuchoice>
330+ Ends the game.
331+ </para>
332+ </listitem>
333+ </itemizedlist>
334+ </para>
335+ </listitem>
336+ </varlistentry>
337+
338+
339+ <varlistentry>
340+ <term><guimenu>View</guimenu></term>
341+ <listitem>
342+ <para>
343+ This menu contains:
344+ <itemizedlist>
345+ <listitem>
346+ <para>
347+ <menuchoice>
348+ <shortcut>
349+ <keysym>F11</keysym>
350+ </shortcut>
351+ <guimenuitem>Fullscreen</guimenuitem>
352+ </menuchoice>
353+ Shows the game window in fullscreen mode.
354+ </para>
355+ </listitem>
356+ <listitem>
357+ <para>
358+ <menuchoice>
359+ <guimenuitem>3D Chess View</guimenuitem>
360+ </menuchoice>
361+ Enables 3D chess view mode using OpenGL. This requires Python OpenGL and Python GTKGLExt installed,
362+ in addition to a 3D graphics card setup properly. Please contact your system administrator if you have problems,
363+ either way you will always be able to play chess in 2D mode.
364+ </para>
365+ </listitem>
366+ <listitem>
367+ <para>
368+ <menuchoice>
369+ <guimenuitem>Show Logs</guimenuitem>
370+ </menuchoice>
371+ Show logs for debugging glChess and the active chess AI engines.
372+ </para>
373+ </listitem>
374+ </itemizedlist>
375+ </para>
376+ </listitem>
377+ </varlistentry>
378+
379+ <varlistentry>
380+ <term><guimenu>Settings</guimenu></term>
381+ <listitem>
382+ <para>
383+ This menu contains:
384+ <itemizedlist>
385+ <listitem>
386+ <para>
387+ <menuchoice>
388+ <guimenuitem>Preferences</guimenuitem>
389+ </menuchoice>
390+ This opens your window to edit <link linkend="prefs">
391+ preferences.</link>
392+ </para>
393+ </listitem>
394+ </itemizedlist>
395+ </para>
396+ </listitem>
397+ </varlistentry>
398+
399+ <varlistentry>
400+ <term><guimenu>Help</guimenu></term>
401+ <listitem>
402+ <para>
403+ This menu contains:
404+ <itemizedlist>
405+ <listitem>
406+ <para>
407+ <menuchoice>
408+ <shortcut>
409+ <keysym>F1</keysym>
410+ </shortcut>
411+ <guimenuitem>Contents</guimenuitem>
412+ </menuchoice>
413+ Display this manual.
414+ </para>
415+ <para>
416+ <guimenuitem>About</guimenuitem> This opens the
417+ <interface>About</interface> dialog which shows
418+ basic information about
419+ <application>glChess</application>, such as
420+ the author's name, the version number of the game.
421+ </para>
422+ </listitem>
423+ </itemizedlist>
424+ </para>
425+ </listitem>
426+ </varlistentry>
427+ </variablelist>
428+
429+
430+</sect2>
431+
432+
433+</sect1>
434+
435+
436+<sect1 id="chess-rules">
437+ <title>Chess Rules</title>
438+ <sect2 id="rules-of-chess">
439+ <title>The Rules of Chess</title>
440+<!--
441+The reference for this chapter is http://en.wikipedia.org/wiki/Chess
442+-->
443+ <para>
444+Chess 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.
445+</para><para>
446+Each 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.
447+</para>
448+ <sect3 id="rules-piece-king">
449+ <title>King</title>
450+<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.
451+
452+</para><para>
453+ 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:
454+</para>
455+<itemizedlist spacing="compact">
456+ <listitem>
457+ <para>The player must never have moved both the king and the rook involved in castling.</para>
458+ </listitem>
459+ <listitem>
460+ <para>There must be no pieces between the king and the rook.</para>
461+ </listitem>
462+ <listitem>
463+ <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>
464+ </listitem>
465+ <listitem>
466+ <para>The king and the rook must be on the same rank (to exclude castling with a promoted pawn).</para>
467+ </listitem>
468+</itemizedlist>
469+</sect3>
470+ <sect3 id="rules-piece-rook">
471+ <title>Rook</title>
472+<para>
473+ The rook moves any number of vacant squares vertically or horizontally (it is also involved in the king's special move of castling).
474+</para>
475+</sect3>
476+ <sect3 id="rules-piece-bishop">
477+ <title>Bishop</title>
478+<para>
479+ 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.
480+</para>
481+</sect3>
482+ <sect3 id="rules-piece-queen">
483+ <title>Queen</title>
484+<para>
485+ The queen can move any number of vacant squares diagonally, horizontally, or vertically.
486+</para>
487+</sect3>
488+ <sect3 id="rules-piece-knight">
489+ <title>Knight</title>
490+<para>
491+ 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.
492+
493+</para>
494+</sect3>
495+ <sect3 id="rules-piece-pawns">
496+ <title>Pawns</title>
497+<para>
498+
499+ 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.
500+</para>
501+</sect3>
502+
503+<sect3 id="rules-movement-others">
504+<title>Remaining movement rules</title>
505+<para>
506+With 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.
507+
508+</para><para>
509+Chess 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).
510+</para>
511+</sect3>
512+</sect2>
513+
514+
515+<sect2 id="timed-games">
516+<title>Timed Games</title>
517+<para>
518+Games can be played with a time-limit by setting a move time when creating a new game. In timed games each
519+player has a certain amount of time available for deciding which moves to make, and the time remaining
520+for each player decreases only when it is their turn to move.
521+</para>
522+</sect2>
523+
524+<sect2 id="draw">
525+<title>Game Draw</title>
526+<para>
527+A 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.
528+</para>
529+
530+
531+<sect3 id="stalemate">
532+<title>Stalemate</title>
533+<para>
534+A 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.
535+</para>
536+</sect3>
537+
538+<sect3 id="threefold-repetition">
539+<title>Threefold repetetion</title>
540+<para>
541+The 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).
542+</para>
543+</sect3>
544+
545+
546+<sect3 id="fifty-move-rule">
547+<title>Fifty move rule</title>
548+<para>
549+The fifty move rule states that the game is drawn after fifty moves from each side without a pawn move or capture.
550+</para>
551+</sect3>
552+
553+<sect3 id="insuff-material">
554+<title>Insufficient material</title>
555+<para>
556+An 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.
557+</para>
558+</sect3>
559+
560+
561+</sect2>
562+
563+</sect1>
564+
565+
566+
567+
568+<sect1 id="prefs">
569+ <title>Game Settings</title>
570+
571+
572+<sect2 id="game-prefs">
573+ <title>Game Preferences</title>
574+ <para>
575+ This preference dialog allows you to modify board orientation, move format and promotion type.
576+ </para>
577+
578+ <figure id="preferences-game-shot">
579+ <title>Game preferences dialog for glChess</title>
580+ <screenshot>
581+ <mediaobject>
582+ <imageobject>
583+ <imagedata fileref="figures/preferences_game.png" format="PNG" srccredit="Andreas"/>
584+ </imageobject>
585+ <textobject>
586+ <phrase>Game preferences dialog for glChess.</phrase>
587+ </textobject>
588+ </mediaobject>
589+ </screenshot>
590+ </figure>
591+
592+
593+</sect2>
594+
595+
596+
597+<sect2 id="view-prefs">
598+ <title>View Preferences</title>
599+ <para>
600+ This preference dialog allows you to modify the look and feel of glChess.
601+ </para>
602+
603+ <figure id="preferences-view-shot">
604+ <title>View preferences dialog for glChess</title>
605+ <screenshot>
606+ <mediaobject>
607+ <imageobject>
608+ <imagedata fileref="figures/preferences_view.png" format="PNG" srccredit="Andreas"/>
609+ </imageobject>
610+ <textobject>
611+ <phrase>View preferences dialog for glChess.</phrase>
612+ </textobject>
613+ </mediaobject>
614+ </screenshot>
615+ </figure>
616+
617+
618+</sect2>
619+
620+</sect1>
621+
622+
623+<sect1 id="engines">
624+ <title>Chess Engines</title>
625+
626+ <para>
627+ glChess should be able to use any Chess Engine Communication Protocol or Universal Chess Interface compatible chess engines, including these chess engines:
628+
629+ </para>
630+
631+<!-- Please keep AI list synchronized with glchess/data/ai.xml -->
632+<itemizedlist spacing="compact">
633+ <listitem>
634+ <para>GNUChess</para>
635+ </listitem>
636+ <listitem>
637+ <para>Sjeng</para>
638+ </listitem>
639+ <listitem>
640+ <para>Amy</para>
641+ </listitem>
642+ <listitem>
643+ <para>Crafty</para>
644+ </listitem>
645+ <listitem>
646+ <para>Faile</para>
647+ </listitem>
648+ <listitem>
649+ <para>Phalanx</para>
650+ </listitem>
651+ <listitem>
652+ <para>Glaurung</para>
653+ </listitem>
654+ <listitem>
655+ <para>HoiChess</para>
656+ </listitem>
657+ <listitem>
658+ <para>Diablo</para>
659+ </listitem>
660+ <listitem>
661+ <para>BBChess </para>
662+ </listitem>
663+ <listitem>
664+ <para>Fruit</para>
665+ </listitem>
666+ <listitem>
667+ <para>Amundsen</para>
668+ </listitem>
669+ <listitem>
670+ <para>Shredder</para>
671+ </listitem>
672+ <listitem>
673+ <para>Toga II</para>
674+ </listitem>
675+ <listitem>
676+ <para>Boo's Chess Engine</para>
677+ </listitem>
678+
679+
680+</itemizedlist>
681+
682+</sect1>
683+
684+
685+<sect1 id="bugs">
686+ <title>Known Bugs and Limitations</title>
687+
688+ <itemizedlist mark="opencircle">
689+ <listitem>
690+ <para>
691+ There are no documented bugs or limitations in glChess. To find areas where you can help improve
692+ glChess, please refer to the TODO file which is distributed with the game.
693+ </para>
694+ </listitem>
695+ </itemizedlist>
696+
697+</sect1>
698+
699+<sect1 id="credits">
700+ <title>Authors</title>
701+ <para>
702+ <application>glChess</application> was written by Robert Ancell,
703+ and is now maintained in gnome-games. This documentation was originally written
704+ by Andreas Røsdal, with input from several GPL sources.
705+ To report a bug or make a suggestion regarding this application or
706+ this manual, follow the directions in this
707+ <ulink url="ghelp:user-guide?feedback-bugs" type="help">document</ulink>.
708+ </para>
709+
710+ <!-- For translations: uncomment this:
711+
712+ <para>
713+ Latin translation was done by ME
714+ (<email>MYNAME@MYADDRESS</email>). Please send all comments and
715+ suggestions regarding this translation to SOMEWHERE.
716+ </para>
717+
718+ -->
719+
720+ </sect1>
721+
722+
723+ <!-- ============= Application License ============================= -->
724+
725+ <sect1 id="license">
726+ <title>License</title>
727+ <para>
728+ This program is free software; you can redistribute it and/or
729+ modify it under the terms of the <citetitle>GNU General Public
730+ License</citetitle> as published by the Free Software Foundation;
731+ either version 2 of the License, or (at your option) any later
732+ version.
733+ </para>
734+ <para>
735+ This program is distributed in the hope that it will be useful, but
736+ WITHOUT ANY WARRANTY; without even the implied warranty of
737+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
738+ <citetitle>GNU General Public License</citetitle> for more details.
739+ </para>
740+ <para>
741+ A copy of the <citetitle>GNU General Public License</citetitle> is
742+ included as an appendix to the <citetitle>GNOME Users
743+ Guide</citetitle>. You may also obtain a copy of the
744+ <citetitle>GNU General Public License</citetitle> from the Free
745+ Software Foundation by visiting <ulink type="http"
746+ url="http://www.fsf.org">their Web site</ulink> or by writing to
747+ <address>
748+ Free Software Foundation, Inc.
749+ <street>59 Temple Place</street> - Suite 330
750+ <city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode>
751+ <country>USA</country>
752+ </address>
753+ </para>
754+ </sect1>
755+</article>
756+
757+
758+
759+
760+
761+
762+
763+
764+
765+
766+
767+
768+
769+
770+
771+
772
773=== added file '.pc/90_fix-help-links.patch/glchess/help/C/index.docbook'
774=== added file '.pc/90_fix-help-links.patch/glchess/help/Makefile.am'
775--- .pc/90_fix-help-links.patch/glchess/help/Makefile.am 1970-01-01 00:00:00 +0000
776+++ .pc/90_fix-help-links.patch/glchess/help/Makefile.am 2012-12-26 19:18:24 +0000
777@@ -0,0 +1,15 @@
778+@YELP_HELP_RULES@
779+HELP_ID = glchess
780+
781+HELP_MEDIA = figures/new_game.png \
782+ figures/game.png \
783+ figures/preferences_game.png \
784+ figures/preferences_view.png
785+
786+HELP_FILES = \
787+ glchess.xml \
788+ legal.xml
789+
790+HELP_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
791+
792+-include $(top_srcdir)/git.mk
793
794=== added directory '.pc/90_fix-help-links.patch/gnect'
795=== added directory '.pc/90_fix-help-links.patch/gnect/help'
796=== added directory '.pc/90_fix-help-links.patch/gnect/help/C'
797=== added file '.pc/90_fix-help-links.patch/gnect/help/C/gnect.xml'
798--- .pc/90_fix-help-links.patch/gnect/help/C/gnect.xml 1970-01-01 00:00:00 +0000
799+++ .pc/90_fix-help-links.patch/gnect/help/C/gnect.xml 2012-12-26 19:18:24 +0000
800@@ -0,0 +1,529 @@
801+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
802+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
803+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
804+[
805+ <!ENTITY legal SYSTEM "legal.xml">
806+ <!ENTITY appversion "2.12">
807+ <!ENTITY manrevision "2.8">
808+ <!ENTITY date "September 2004">
809+ <!ENTITY app "<application>Four-in-a-Row</application>">
810+ <!ENTITY appname "Four-in-a-Row">
811+ <!ENTITY version "2.8">
812+]>
813+
814+
815+<!-- ===== DOCUMENT HEADER ===== -->
816+
817+<article id="index" lang="en">
818+<!-- please do not change the id -->
819+<!-- translators, change lang to the appropriate code -->
820+ <articleinfo>
821+ <title>&appname; Manual</title>
822+ <abstract role="description">
823+ <para>
824+ The object of Four-in-a-Row is to place four pieces in a vertical,
825+ horizontal, or diagonal row while the opponent tries to block and
826+ make his/her own row of four. Four-in-a-Row can be played against
827+ another human or the computer.
828+ </para>
829+ </abstract>
830+
831+ <copyright>
832+ <year>2001-2002</year>
833+ <holder>Timothy Musson</holder>
834+ </copyright>
835+
836+ <!-- translators: uncomment this:
837+
838+ <copyright>
839+ <year>2000</year>
840+ <holder>ME-THE-TRANSLATOR (Latin translation)</holder>
841+ </copyright>
842+
843+ -->
844+
845+ <publisher role="maintainer">
846+ <publishername> GNOME Documentation Project </publishername>
847+ </publisher>
848+
849+ &legal;
850+
851+ <authorgroup>
852+ <author>
853+ <firstname>Timothy</firstname>
854+ <surname>Musson</surname>
855+ <affiliation>
856+ <!-- <orgname></orgname> -->
857+ <address><email>trmusson@ihug.co.nz</email></address>
858+ </affiliation>
859+ </author>
860+
861+<!-- This is appropriate place for other contributors: translators,
862+ maintainers, etc. Commented out by default.
863+
864+ <othercredit role="translator">
865+ <firstname>Latin</firstname>
866+ <surname>Translator 1</surname>
867+ <affiliation>
868+ <orgname>Latin Translation Team</orgname>
869+ <address> <email>translator@gnome.org</email> </address>
870+ </affiliation>
871+ <contrib>Latin translation</contrib>
872+ </othercredit>
873+-->
874+ </authorgroup>
875+
876+ <releaseinfo revision="2.26" role="review"/>
877+
878+ <revhistory>
879+ <revision>
880+ <revnumber>&appname; Manual V&manrevision;</revnumber>
881+ <date>&date;</date>
882+ <revdescription>
883+ <para role="author">Timothy Musson
884+ <email>trmusson@ihug.co.nz</email>
885+ </para>
886+ <para role="publisher"></para>
887+ </revdescription>
888+ </revision>
889+ </revhistory>
890+
891+ <releaseinfo>This manual describes version &appversion; of &appname;.
892+ </releaseinfo>
893+
894+ <legalnotice>
895+ <title>Feedback</title>
896+ <para>To report a bug or make a suggestion regarding the &appname;
897+ application or this manual, follow the directions in the
898+ <ulink url="ghelp:user-guide?feedback-bugs"
899+ type="help">GNOME Feedback Page</ulink>.
900+ </para>
901+ </legalnotice>
902+ </articleinfo>
903+
904+
905+ <!-- ============= Document Body ============================= -->
906+
907+ <!-- ============= Introduction ============================== -->
908+
909+
910+ <sect1 id="intro">
911+
912+ <title>Introduction</title>
913+
914+ <para>
915+ &app; is a four-in-a-row game for the GNOME Project.
916+ The object of the game is to build a line of four of your marbles
917+ while trying to stop your opponent (human or computer) building a
918+ line of his or her own. A line can be horizontal, vertical or
919+ diagonal.
920+ </para>
921+
922+ <para>
923+ To run &app;, select
924+ <guimenuitem>&appname;</guimenuitem> from the
925+ <guisubmenu>Games</guisubmenu> submenu of the
926+ <guimenu>Main Menu</guimenu>, or type
927+ <command>gnect</command> on the command line.
928+ </para>
929+
930+ <para>
931+ &app; is included in the <filename>GNOME-games</filename> package,
932+ which is part of the GNOME desktop environment. This document describes
933+ version &version; of &app;.
934+ </para>
935+
936+ <para>
937+ &appname; also features multiplayer support with two
938+ human players in hotseat mode.
939+ </para>
940+
941+
942+ </sect1>
943+
944+
945+ <!-- ============= Usage ===================================== -->
946+
947+
948+ <sect1 id="usage">
949+
950+ <title>Basic Usage</title>
951+
952+ <!-- ===== How to play ===== -->
953+
954+ <sect2 id="playing">
955+
956+ <title>Playing &appname;</title>
957+
958+ <para>
959+ To start a new game of &appname; choose <menuchoice><guimenu>Game</guimenu><guimenuitem>New Game</guimenuitem></menuchoice>.
960+ </para>
961+
962+ <para>
963+ The <interface>game board</interface> consists of seven columns and
964+ 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.
965+ </para>
966+
967+ <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.
968+ </para>
969+
970+ <!-- Figure -->
971+ <mediaobject id="mainwindow-fig">
972+ <imageobject>
973+ <imagedata fileref="figures/mainwindow.png"
974+ format="PNG"
975+ srccredit="trm"/>
976+ </imageobject>
977+ <textobject>
978+ <phrase>&appname;'s Main Window</phrase>
979+ </textobject>
980+ <caption><para>&appname;'s Main Window</para></caption>
981+ </mediaobject>
982+
983+ <para>
984+ The game is won when one of the two players manages to line up four
985+ of his or her marbles horizontally, vertically or diagonally. If the
986+ board fills up without a win, the game ends in a draw.
987+ </para>
988+
989+ </sect2>
990+
991+ <!-- ===== Commands ===== -->
992+
993+ <sect2 id="commands">
994+ <title>Commands</title>
995+ <anchor id="menubar"/><!-- id for removed section -->
996+
997+ <para>To take back a move, choose <menuchoice>
998+ <shortcut><keycombo>
999+ <keysym>Ctrl</keysym><keycap>Z</keycap>
1000+ </keycombo></shortcut>
1001+ <guimenuitem>Undo move</guimenuitem>
1002+ </menuchoice>.
1003+ If you're playing against a friend, this will undo one
1004+ move. If you're playing against the computer, this will
1005+ undo the computer's last move and then yours.
1006+ Repeating this will return the board to its initial
1007+ state.
1008+ </para>
1009+ <para>Choose <menuchoice>
1010+ <shortcut><keycombo>
1011+ <keysym>Ctrl</keysym><keycap>H</keycap>
1012+ </keycombo></shortcut>
1013+ <guimenuitem>Hint</guimenuitem>
1014+ </menuchoice> to get a suggestion from the computer for your next move.
1015+ This is shown in the status bar.</para>
1016+
1017+ <para>
1018+ Choose <menuchoice>
1019+ <guimenuitem>Scores</guimenuitem>
1020+ </menuchoice> to show a tally of wins and draws
1021+ for the current playing session. The scores will be reset to
1022+ zero if Player Selection is changed in Preferences.
1023+ </para>
1024+
1025+
1026+ </sect2>
1027+
1028+ <!-- ===== Preferences ===== -->
1029+
1030+ <sect2 id="prefsdialog">
1031+
1032+ <title>Preferences</title>
1033+
1034+ <para>
1035+ To change the game's settings, select
1036+ <guimenuitem>Preferences</guimenuitem> from the
1037+ <guimenu>Settings</guimenu> menu. This opens the
1038+ <interface>Preferences Dialog</interface>.
1039+ </para>
1040+
1041+ <para>
1042+ Configuration options in the <guilabel>Game</guilabel>
1043+ tab are:
1044+
1045+ <variablelist>
1046+
1047+ <varlistentry>
1048+ <term>
1049+ <guilabel>Player One</guilabel> and
1050+ <guilabel>Player Two</guilabel>
1051+ </term>
1052+ <listitem>
1053+ <para>
1054+
1055+ These two columns tell &app; who's playing and, if it is the computer, how hard they play. To play against a friend, select
1056+ Human for both Player One and Player Two.
1057+
1058+ </para>
1059+ </listitem>
1060+ </varlistentry>
1061+
1062+ <varlistentry>
1063+ <term><guilabel>Theme</guilabel></term>
1064+ <listitem>
1065+ <para>
1066+ The theme menu lists available themes and lets
1067+ you choose your favourite.
1068+ </para>
1069+ </listitem>
1070+ </varlistentry>
1071+
1072+ <varlistentry>
1073+ <term><guilabel>Enable Animation</guilabel></term>
1074+ <listitem>
1075+ <para>
1076+ Here you can toggle the game's animation on or off.
1077+ </para>
1078+ </listitem>
1079+ </varlistentry>
1080+
1081+ </variablelist>
1082+ </para>
1083+ <para>
1084+ Finally there is a <guilabel>Controls</guilabel> tab to
1085+ change the keyboard controls. To change a control, double click the
1086+ appropriate entry and then press the new key.
1087+ </para>
1088+
1089+ </sect2>
1090+ </sect1>
1091+
1092+
1093+ <!-- ===== Custom Themes ===================================== -->
1094+
1095+
1096+ <sect1 id="custom">
1097+
1098+ <title>Creating New Themes</title>
1099+
1100+ <para>
1101+ This section's included in case you'd like to make your own themes for
1102+ &app;. It assumes you're familiar with basic text editing, graphics
1103+ software and the command line.
1104+ </para>
1105+
1106+ <sect2 id="images">
1107+
1108+ <title>Images</title>
1109+
1110+ <para>
1111+ &app;'s tile sets contain six tiles of equal size, lined up
1112+ horizontally. From left to right:
1113+ </para>
1114+
1115+ <orderedlist>
1116+ <listitem>
1117+ <para>Player One's marble as it appears on the game board</para>
1118+ </listitem>
1119+ <listitem>
1120+ <para>Player Two's marble as it appears on the game board</para>
1121+ </listitem>
1122+ <listitem>
1123+ <para>The game board's background</para>
1124+ </listitem>
1125+ <listitem>
1126+ <para>The top row's background</para>
1127+ </listitem>
1128+ <listitem>
1129+ <para>Player One's marble as it appears on the top row</para>
1130+ </listitem>
1131+ <listitem>
1132+ <para>Player Two's marble as it appears on the top row</para>
1133+ </listitem>
1134+ </orderedlist>
1135+
1136+ <figure id="shot1">
1137+ <title>An example tile set</title>
1138+ <screenshot>
1139+ <screeninfo>This image shows the six tiles in a tile set</screeninfo>
1140+ <graphic format="PNG" fileref="figures/tileset.png" srccredit="TRM"></graphic>
1141+ </screenshot>
1142+ </figure>
1143+
1144+ <para>
1145+ Tiles three and four will be repeated over the game board and
1146+ top row unless a full window background image is specified in the
1147+ theme file.
1148+ </para>
1149+
1150+ <tip>
1151+ <title>TIP</title>
1152+ <para>
1153+ PNG format is recommended for tile sets. The first, second, fifth
1154+ and sixth tiles should contain some transparency if you want the
1155+ background to show through. The third and fourth tiles should be
1156+ solid, with no transparency, even if you'll be using a full
1157+ window background image with your theme.
1158+ </para>
1159+ </tip>
1160+
1161+ <tip>
1162+ <title>TIP</title>
1163+ <para>
1164+ Tiles can be square or rectangular, and any size you like. Most
1165+ of the tile sets that come with &app; use square tiles measuring
1166+ 50 pixels by 50 pixels.
1167+ </para>
1168+ </tip>
1169+
1170+ <para>
1171+ For a full window background image, there's a bit more work to do.
1172+ Let's say your tiles measure 50 by 50 pixels each. The game's display
1173+ measures 7 by 7 tiles, including the top row, so the ideal background
1174+ image for your tile set measures 350 by 350 pixels.
1175+ </para>
1176+
1177+ <tip>
1178+ <title>TIP</title>
1179+ <para>
1180+ &app; will automatically scale the background image if it doesn't
1181+ match the tile set. This means you can make "large" and "small"
1182+ versions of your theme, both using the same background image,
1183+ just by having a large and a small version of your tile set.
1184+ </para>
1185+ </tip>
1186+
1187+ <para>
1188+ So, you now have a tile set and perhaps a background image to
1189+ go with it. The next step is to put them in the right place.
1190+ </para>
1191+
1192+ </sect2>
1193+
1194+
1195+ <sect2 id="directories">
1196+
1197+ <title>Putting It Together</title>
1198+
1199+ <para>
1200+ The last step is to put your image(s) where &app; can
1201+ find them. You could put them in Four-in-a-row's install directory (which will
1202+ depend on your particular system), but your home directory's probably
1203+ a better idea.
1204+ </para>
1205+
1206+ <para>
1207+ Make a <filename class="directory">~/.gnect</filename> directory,
1208+ and a <filename class="directory">~/.gnect/pixmaps</filename>
1209+ directory. Those names are important, as &app; won't look
1210+ anywhere else.
1211+ </para>
1212+
1213+ <para>
1214+ Copy your image(s) into the pixmaps directory.
1215+ </para>
1216+
1217+ <para>
1218+ If you start &app; from the command line, it'll give you clues about
1219+ any problems it has with your new theme. If it has none, you'll
1220+ find your new theme listed the
1221+ <interface>Preferences Dialog</interface>.
1222+ </para>
1223+
1224+ <para>Have fun!</para>
1225+
1226+ </sect2>
1227+
1228+
1229+ </sect1>
1230+
1231+
1232+ <!-- ===== Bugs ============================================== -->
1233+
1234+
1235+ <sect1 id="bugs">
1236+
1237+ <title>Known Bugs and Limitations</title>
1238+
1239+ <para>
1240+ Occasionally a marble-dropping animation doesn't look as smooth
1241+ as it should.
1242+ </para>
1243+
1244+ </sect1>
1245+
1246+
1247+ <!-- ===== Authors =========================================== -->
1248+
1249+
1250+ <sect1 id="authors">
1251+
1252+ <title>Authors</title>
1253+
1254+ <para>
1255+ &app; was written by Timothy Musson (<email>trmusson@ihug.co.nz</email>)
1256+ and David Neary (<email>bolsh@gimp.org</email>). Various others
1257+ have taken the time to help in many ways since work on &app; began.
1258+ </para>
1259+ <para>
1260+ The <ulink type="http"
1261+ url="http://www.ce.unipr.it/~gbe/velena.html">Velena Engine</ulink>,
1262+ &app;'s main computer player, was written by Giuliano Bertoletti.
1263+ We're grateful to him for allowing us to include his work, without
1264+ which &app; wouldn't be nearly as worthwhile.
1265+ </para>
1266+ <para>
1267+ This manual was written by Timothy Musson.
1268+ </para>
1269+ <para>
1270+ To report a bug or make a suggestion regarding this application or
1271+ this manual, follow the directions in this
1272+ <ulink url="ghelp:user-guide?feedback-bugs" type="help">document</ulink>.
1273+ </para>
1274+
1275+
1276+<!-- For translations: uncomment this:
1277+
1278+ <para>
1279+ Latin translation was done by ME
1280+ (<email>MYNAME@MYADDRESS</email>). Please send all comments and
1281+ suggestions regarding this translation to SOMEWHERE.
1282+ </para>
1283+
1284+-->
1285+
1286+ </sect1>
1287+
1288+
1289+ <!-- ============= License =================================== -->
1290+
1291+
1292+ <sect1 id="license">
1293+
1294+ <title>License</title>
1295+
1296+ <para>
1297+ This program is free software; you can redistribute it and/or
1298+ modify it under the terms of the <citetitle>GNU General Public
1299+ License</citetitle> as published by the Free Software Foundation;
1300+ either version 2 of the License, or (at your option) any later
1301+ version.
1302+ </para>
1303+
1304+ <para>
1305+ This program is distributed in the hope that it will be useful, but
1306+ WITHOUT ANY WARRANTY; without even the implied warranty of
1307+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1308+ <citetitle>GNU General Public License</citetitle> for more details.
1309+ </para>
1310+
1311+ <para>
1312+ A copy of the <citetitle>GNU General Public License</citetitle> is
1313+ included as an appendix to the <citetitle>GNOME Users
1314+ Guide</citetitle>. You may also obtain a copy of the
1315+ <citetitle>GNU General Public License</citetitle> from the Free
1316+ Software Foundation by visiting
1317+ <ulink url="http://www.fsf.org" type="http">their Web site</ulink> or
1318+ by writing to
1319+ <address>
1320+ Free Software Foundation, Inc.
1321+ <street>59 Temple Place</street> - Suite 330
1322+ <city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode>
1323+ <country>USA</country>
1324+ </address>
1325+ </para>
1326+
1327+ </sect1>
1328+
1329+</article>
1330
1331=== added file '.pc/90_fix-help-links.patch/gnect/help/C/index.docbook'
1332=== added file '.pc/90_fix-help-links.patch/gnect/help/Makefile.am'
1333--- .pc/90_fix-help-links.patch/gnect/help/Makefile.am 1970-01-01 00:00:00 +0000
1334+++ .pc/90_fix-help-links.patch/gnect/help/Makefile.am 2012-12-26 19:18:24 +0000
1335@@ -0,0 +1,16 @@
1336+@YELP_HELP_RULES@
1337+HELP_ID = gnect
1338+
1339+HELP_MEDIA = \
1340+ figures/mainwindow.png \
1341+ figures/tileset.png \
1342+ figures/connect.png \
1343+ figures/tables.png
1344+
1345+HELP_FILES = \
1346+ gnect.xml \
1347+ legal.xml
1348+
1349+HELP_LINGUAS = ca cs da de el en_GB es eu fi fr it oc sl sr sr@latin sv zh_CN
1350+
1351+-include $(top_srcdir)/git.mk
1352
1353=== added directory '.pc/90_fix-help-links.patch/gnibbles'
1354=== added directory '.pc/90_fix-help-links.patch/gnibbles/help'
1355=== added directory '.pc/90_fix-help-links.patch/gnibbles/help/C'
1356=== added file '.pc/90_fix-help-links.patch/gnibbles/help/C/gnibbles.xml'
1357--- .pc/90_fix-help-links.patch/gnibbles/help/C/gnibbles.xml 1970-01-01 00:00:00 +0000
1358+++ .pc/90_fix-help-links.patch/gnibbles/help/C/gnibbles.xml 2012-12-26 19:18:24 +0000
1359@@ -0,0 +1,592 @@
1360+<?xml version="1.0"?>
1361+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
1362+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
1363+ <!ENTITY legal SYSTEM "legal.xml">
1364+ <!ENTITY appversion "2.20">
1365+ <!ENTITY manrevision "2.20">
1366+ <!ENTITY date "May 2007">
1367+ <!ENTITY app "<application>Nibbles</application>">
1368+ <!ENTITY appname "Nibbles">
1369+ <!ENTITY VERSION "2.20">
1370+]>
1371+
1372+<!--
1373+ (Do not remove this comment block.)
1374+ Maintained by the GNOME Documentation Project
1375+ http://developer.gnome.org/projects/gdp
1376+ Template version: 2.0 beta
1377+ Template last modified Feb 12, 2002
1378+-->
1379+
1380+<!-- =============Document Header ============================= -->
1381+
1382+<article id="index" lang="en">
1383+<!-- please do not change the id; for translations, change lang to -->
1384+<!-- appropriate code -->
1385+ <articleinfo>
1386+ <title>&app; Manual</title>
1387+
1388+ <abstract role="description">
1389+ <para>
1390+ Nibbles is a worm game for GNOME. The player controls a 2D
1391+ worm while trying to get food. Getting food gives points,
1392+ but hitting anything causes a loss of points. When all points
1393+ are lost, the player loses.
1394+ </para>
1395+ </abstract>
1396+
1397+ <copyright>
1398+ <year>2000</year>
1399+ <holder>Kevin Breit</holder>
1400+ </copyright>
1401+
1402+ <!-- translators: uncomment this:
1403+
1404+ <copyright>
1405+ <year>2000</year>
1406+ <holder>ME-THE-TRANSLATOR (Latin translation)</holder>
1407+ </copyright>
1408+
1409+ -->
1410+
1411+<!-- An address can be added to the publisher information. If a role is
1412+ not specified, the publisher/author is the same for all versions of the
1413+ document. -->
1414+ <publisher>
1415+ <publishername> GNOME Documentation Project </publishername>
1416+ </publisher>
1417+
1418+ &legal;
1419+ <!-- This file contains link to license for the documentation (GNU FDL), and
1420+ other legal stuff such as "NO WARRANTY" statement. Please do not change
1421+ any of this. -->
1422+
1423+ <authorgroup>
1424+ <author role="maintainer">
1425+ <firstname>Kevin</firstname>
1426+ <surname>Breit</surname>
1427+ <affiliation>
1428+ <orgname>GNOME Documentation Project</orgname>
1429+ <address> <email>battery841@mypad.com</email> </address>
1430+ </affiliation>
1431+ </author>
1432+<!-- This is appropriate place for other contributors: translators,
1433+ maintainers, etc. Commented out by default.
1434+ <othercredit role="translator">
1435+ <firstname>Latin</firstname>
1436+ <surname>Translator 1</surname>
1437+ <affiliation>
1438+ <orgname>Latin Translation Team</orgname>
1439+ <address> <email>translator@gnome.org</email> </address>
1440+ </affiliation>
1441+ <contrib>Latin translation</contrib>
1442+ </othercredit>
1443+-->
1444+ </authorgroup>
1445+
1446+ <releaseinfo revision="2.26" role="review"/>
1447+
1448+ <revhistory>
1449+ <revision>
1450+ <revnumber>&appname; Manual V&manrevision;</revnumber>
1451+ <date>&date;</date>
1452+ <revdescription>
1453+ <para role="author">Kevin Breit
1454+ <email>battery841@mypad.com</email>
1455+ </para>
1456+ <para role="publisher">GNOME Documentation Project</para>
1457+ </revdescription>
1458+ </revision>
1459+ </revhistory>
1460+
1461+ <releaseinfo>This manual describes version &appversion; of &appname;.
1462+ </releaseinfo>
1463+ <!-- The following feedback information only applies to appliactions
1464+ listed in bugzilla.gnome.org and bugzilla.ximian.com. For other
1465+ applications, please provide your own feedback info or remove thsi
1466+ section altogether -->
1467+ <legalnotice>
1468+ <title>Feedback</title>
1469+ <para>To report a bug or make a suggestion regarding the &app; application or
1470+ this manual, follow the directions in the
1471+ <ulink url="ghelp:user-guide?feedback-bugs"
1472+ type="help">GNOME Feedback Page</ulink>.
1473+ </para>
1474+<!-- Translators may also add here feedback address for translations -->
1475+ </legalnotice>
1476+ </articleinfo>
1477+
1478+ <indexterm zone="index">
1479+ <primary>Nibbles</primary>
1480+ </indexterm>
1481+
1482+ <!-- ============= Document Body ============================= -->
1483+
1484+ <!-- ============= Introduction ============================== -->
1485+ <sect1 id="intro">
1486+ <title>Introduction</title>
1487+
1488+ <para>
1489+ <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.
1490+ </para>
1491+
1492+ <para>
1493+ To run <application>Nibbles</application>, select
1494+ <menuchoice>
1495+ <guisubmenu>Games</guisubmenu>
1496+ <guimenuitem>Nibbles</guimenuitem>
1497+ </menuchoice>
1498+ from the <guimenu>Applications</guimenu> menu, or type
1499+ <command>gnibbles</command> on the command line.
1500+ </para>
1501+
1502+ <para>
1503+ <application>Nibbles</application> is included in the
1504+ <filename>gnome-games</filename> package, which is part of the
1505+ GNOME desktop environment. This document describes version
1506+ &VERSION; of <application>Nibbles</application>.
1507+ </para>
1508+ </sect1>
1509+
1510+ <sect1 id="objective">
1511+ <title>Nibbles Objective</title>
1512+ <para>
1513+ The objective of Nibbles is quite simple. You control the worm and
1514+ if the worm runs into a wall or runs into itself, you die. You get ten
1515+ lives before your game is over. You win by either beating your own high
1516+ score (or a friend's) or by completing all the levels. It is also
1517+ possible to play against worms with artificial intelligence.
1518+ </para>
1519+ <para>
1520+ &appname; also features multiplayer support with up to six competing
1521+ human players in hotseat mode.
1522+ </para>
1523+ </sect1>
1524+
1525+ <!-- ================ Usage ================================ -->
1526+ <!-- This section should describe basic usage of the application. -->
1527+
1528+ <sect1 id="usage">
1529+ <title>Using Nibbles</title>
1530+ <para>
1531+ <application>Nibbles</application> is a simple game to play. The only keys
1532+ that are needed are the arrow keys.
1533+ </para>
1534+
1535+ <!-- ========= Basic Usage =========================== -->
1536+<sect2 id="mainwin">
1537+<title>Basic usage</title>
1538+<para>
1539+Starting <application>Nibbles</application> opens
1540+the <interface>main window</interface> shown below.
1541+<figure id="intro-fig">
1542+<title>Nibbles Introduction Window</title>
1543+<screenshot>
1544+ <mediaobject>
1545+ <imageobject>
1546+<imagedata fileref="figures/intro.png" format="PNG"/>
1547+ </imageobject>
1548+ <textobject>
1549+ <phrase>Nibbles Introduction Window.</phrase>
1550+ </textobject>
1551+ </mediaobject>
1552+</screenshot>
1553+</figure>
1554+</para>
1555+<para>
1556+To start the game, select <menuchoice><guimenu>Game</guimenu>
1557+<guimenuitem>New Game</guimenuitem></menuchoice>.
1558+</para>
1559+<para>
1560+When the game starts, the worm will come out of the left side of the
1561+screen. You use the up arrow to make the direction of the worm go up.
1562+Use the right arrow to turn the worm right, left arrow to turn the worm
1563+left, and down arrow to turn the worm down.
1564+<figure id="gameplay">
1565+<title>Nibbles During Gameplay</title>
1566+<screenshot>
1567+ <mediaobject>
1568+ <imageobject>
1569+ <imagedata fileref="figures/playing.png" format="PNG"/>
1570+ </imageobject>
1571+ <textobject>
1572+ <phrase>Nibbles During Gameplay.</phrase>
1573+ </textobject>
1574+ </mediaobject>
1575+</screenshot>
1576+</figure>
1577+</para>
1578+</sect2>
1579+
1580+<!-- This section should also describe main elements of graphic user
1581+interface, such as menus and buttons, unless this description
1582+is too long - in that case, it should be moved to a separate
1583+section. For example -->
1584+
1585+
1586+<!-- ========= Menus =========================== -->
1587+<sect2 id="menubar">
1588+ <title>Menus</title>
1589+ <para>
1590+ The menu bar, located at the top of the <interface>Main
1591+ Window</interface>, contains the following menus:
1592+ </para>
1593+
1594+ <variablelist>
1595+ <varlistentry>
1596+ <term><guimenu>Game</guimenu></term>
1597+ <listitem>
1598+ <para>
1599+ This menu contains:
1600+ <itemizedlist>
1601+ <listitem>
1602+ <para>
1603+ <menuchoice>
1604+ <shortcut>
1605+ <keysym>Ctrl+N</keysym>
1606+ </shortcut>
1607+ <guimenuitem>New Game</guimenuitem>
1608+ </menuchoice>
1609+ This starts a new game of <application>Nibbles</application>.
1610+ </para>
1611+ </listitem>
1612+ <listitem>
1613+ <para>
1614+ <menuchoice>
1615+ <guimenuitem>Scores</guimenuitem>
1616+ </menuchoice>
1617+ This shows the high scores.
1618+ </para>
1619+ </listitem>
1620+ <listitem>
1621+ <para>
1622+ <menuchoice>
1623+ <guimenuitem>Pause game</guimenuitem>
1624+ </menuchoice>
1625+ This will pause your game. Click on the <quote>Pause Game
1626+ </quote> menu option to resume game.
1627+ </para>
1628+ </listitem>
1629+ <listitem>
1630+ <para>
1631+ <menuchoice>
1632+ <guimenuitem>End Game</guimenuitem>
1633+ </menuchoice>
1634+ End the current game and return to the title screen.
1635+ </para>
1636+ </listitem>
1637+ <listitem>
1638+ <para>
1639+ <menuchoice>
1640+ <shortcut>
1641+ <keysym>Ctrl-Q</keysym>
1642+ </shortcut>
1643+ <guimenuitem>Exit</guimenuitem>
1644+ </menuchoice>
1645+ This quits the application.
1646+ </para>
1647+ </listitem>
1648+ </itemizedlist>
1649+ </para>
1650+ </listitem>
1651+ </varlistentry>
1652+
1653+ <varlistentry>
1654+ <term><guimenu>View</guimenu></term>
1655+ <listitem>
1656+ <para>
1657+ This menu contains:
1658+ <itemizedlist>
1659+ <listitem>
1660+ <para>
1661+ <menuchoice>
1662+ <guimenuitem>Fullscreen</guimenuitem>
1663+ </menuchoice>
1664+ This toggles your game window to be fullscreen.
1665+ </para>
1666+ </listitem>
1667+ </itemizedlist>
1668+ </para>
1669+ </listitem>
1670+ </varlistentry>
1671+
1672+ <varlistentry>
1673+ <term><guimenu>Settings</guimenu></term>
1674+ <listitem>
1675+ <para>
1676+ This menu contains:
1677+ <itemizedlist>
1678+ <listitem>
1679+ <para>
1680+ <menuchoice>
1681+ <guimenuitem>Preferences</guimenuitem>
1682+ </menuchoice>
1683+ This opens your window to edit <link linkend="prefs">
1684+ preferences.</link>
1685+ </para>
1686+ </listitem>
1687+ </itemizedlist>
1688+ </para>
1689+ </listitem>
1690+ </varlistentry>
1691+
1692+ <varlistentry>
1693+ <term><guimenu>Help</guimenu></term>
1694+ <listitem>
1695+ <para>
1696+ This menu contains:
1697+ <itemizedlist>
1698+ <listitem>
1699+ <para>
1700+ <menuchoice>
1701+ <shortcut>
1702+ <keysym>F1</keysym>
1703+ </shortcut>
1704+ <guimenuitem>Contents</guimenuitem>
1705+ </menuchoice>
1706+ Display this manual.
1707+ </para>
1708+ <para>
1709+ <guimenuitem>About</guimenuitem> This opens the
1710+ <interface>About</interface> dialog which shows
1711+ basic information about
1712+ <application>Nibbles</application>, such as
1713+ the author's name, the version number of the game.
1714+ </para>
1715+ </listitem>
1716+ </itemizedlist>
1717+ </para>
1718+ </listitem>
1719+ </varlistentry>
1720+ </variablelist>
1721+ </sect2>
1722+ <sect2 id="diamonds">
1723+ <title>Diamonds</title>
1724+ <para>
1725+ <application>Nibbles</application> has numerous different
1726+ diamonds to eat. They are each a different color and serve
1727+ a different function. Only the pale purple diamond is guaranteed
1728+ to be around long enough for you to eat it (in fact, you have to
1729+ eat them to finish the level). The other diamonds are all bonuses,
1730+ but they only stick around for a short time. We'll leave it up to
1731+ you to discover just what the bonus each colour gives, but they
1732+ all affect either the score, the length of the worm, or both. Be careful
1733+ when going for these bonus diamonds, don't cut yourself off from
1734+ the ordinary diamonds that you need to finish the level.
1735+ </para>
1736+ </sect2>
1737+ </sect1>
1738+
1739+
1740+ <!-- ============= Customization ============================= -->
1741+ <sect1 id="prefs">
1742+ <title>Customization</title>
1743+ <para>
1744+ To change the application settings, select
1745+ <menuchoice>
1746+ <guimenu>Settings</guimenu>
1747+ <guimenuitem>Preferences</guimenuitem>
1748+ </menuchoice>. This opens the
1749+ <interface>Preferences</interface> dialog. All preferences are
1750+ automatically saved and applied as you change them.
1751+ </para>
1752+
1753+ <figure id="game-prefs">
1754+ <title>Game Preferences Tab</title>
1755+ <screenshot>
1756+ <mediaobject>
1757+ <imageobject>
1758+ <imagedata fileref="figures/game.png" format="PNG" srccredit="Kevin Breit"/>
1759+ </imageobject>
1760+ <textobject>
1761+ <phrase>Game Preferences Tab.</phrase>
1762+ </textobject>
1763+ </mediaobject>
1764+ </screenshot>
1765+ </figure>
1766+
1767+ <para>
1768+ The properties in the <guilabel>Game</guilabel> tab are:
1769+ <variablelist>
1770+ <varlistentry>
1771+ <term>Speed</term>
1772+ <listitem>
1773+ <para>
1774+ This controls the speed of the worm.
1775+ </para>
1776+ </listitem>
1777+ </varlistentry>
1778+ <varlistentry>
1779+ <term>Play levels in random order</term>
1780+ <listitem>
1781+ <para>
1782+ Selecting this causes the level
1783+ advancement to happen in random order.
1784+ </para>
1785+ </listitem>
1786+ </varlistentry>
1787+ <varlistentry>
1788+ <term>Enable fake bonuses</term>
1789+ <listitem>
1790+ <para>
1791+ When enabled, this allows for two blue diamonds on
1792+ the screen at a time. One diamond makes you shrink instead of grow when
1793+ eaten.
1794+ </para>
1795+ </listitem>
1796+ </varlistentry>
1797+ <varlistentry>
1798+ <term>Enable sounds</term>
1799+ <listitem>
1800+ <para>
1801+ Controls the use of sound in the game.
1802+ </para>
1803+ </listitem>
1804+ </varlistentry>
1805+ <varlistentry>
1806+ <term>Starting level</term>
1807+ <listitem>
1808+ <para>
1809+ Which level to start with. Use this if you want to jump
1810+ immediately to a challenging level.
1811+ </para>
1812+ </listitem>
1813+ </varlistentry>
1814+ <varlistentry>
1815+ <term>Number of human players</term>
1816+ <listitem>
1817+ <para>
1818+ There is room for up to six players.
1819+ </para>
1820+ </listitem>
1821+ </varlistentry>
1822+ <varlistentry>
1823+ <term>Number of AI players</term>
1824+ <listitem>
1825+ <para>
1826+ There is room for up to six AI players. Note that the total
1827+ number of human and AI players must be less than or equal to six.
1828+ </para>
1829+ </listitem>
1830+ </varlistentry>
1831+ </variablelist>
1832+ </para>
1833+ <para>
1834+
1835+ <figure id="worm-prefs">
1836+ <title>Worm Preferences Tab</title>
1837+ <screenshot>
1838+ <mediaobject>
1839+ <imageobject>
1840+ <imagedata fileref="figures/worm_op.png" format="PNG" srccredit="Kevin Breit"/>
1841+ </imageobject>
1842+ <textobject>
1843+ <phrase>Worm Preferences Tab.</phrase>
1844+ </textobject>
1845+ </mediaobject>
1846+ </screenshot>
1847+ </figure>
1848+
1849+ The properties in the <guilabel>Worm 1 </guilabel>through <guilabel> Worm
1850+6</guilabel> tabs let you set individual preferences for the different worms.
1851+
1852+ <variablelist>
1853+ <varlistentry>
1854+ <term>Keyboard controls</term>
1855+ <listitem>
1856+ <para>
1857+ This list let you change the keyboard controls for the given
1858+ worm. To change a control, double click on the appropriate entry and
1859+ then press the key you want to use for that control.
1860+ </para>
1861+ </listitem>
1862+ </varlistentry>
1863+ <varlistentry>
1864+ <term>Use relative motion</term>
1865+ <listitem>
1866+ <para>
1867+ Rather than left sending your worm toward the left of the screen,
1868+ right toward the right and so on, the left and right keys make
1869+ the worm perform a left or right turn. For example, if the worm
1870+ is moving to the left and you press the left control it turns to
1871+ head toward the bottom of the screen.
1872+ </para>
1873+ </listitem>
1874+ </varlistentry>
1875+ <varlistentry>
1876+ <term>Worm color</term>
1877+ <listitem>
1878+ <para>
1879+ Customize the color of your worm so you can tell it from your
1880+ opponent's worm in multi-player mode.
1881+ </para>
1882+ </listitem>
1883+ </varlistentry>
1884+ </variablelist>
1885+
1886+ </para>
1887+
1888+ </sect1>
1889+
1890+<!-- ============= Authors ================================ -->
1891+
1892+ <sect1 id="authors">
1893+ <title>Authors</title>
1894+ <para>
1895+ <application>Nibbles</application> was written by Sean MacIsaac
1896+ <email>sjm@acm.org</email> and Ian Peters <email>itp@gnu.org</email>.
1897+ This manual was written by Kevin Breit <email>battery841@mypad.com</email>.
1898+ Nibbles was updated with network support by Andreas Røsdal <email>andreasr@gnome.org</email>.
1899+ To report a bug or make a suggestion regarding this application or
1900+ this manual, follow the directions in this
1901+ <ulink url="ghelp:user-guide?feedback-bugs" type="help">document</ulink>.
1902+ </para>
1903+
1904+ <!-- For translations: uncomment this:
1905+
1906+ <para>
1907+ Latin translation was done by ME
1908+ (<email>MYNAME@MYADDRESS</email>). Please send all comments and
1909+ suggestions regarding this translation to SOMEWHERE.
1910+ </para>
1911+
1912+ -->
1913+
1914+ </sect1>
1915+
1916+
1917+ <!-- ============= Application License ============================= -->
1918+
1919+ <sect1 id="license">
1920+ <title>License</title>
1921+ <para>
1922+ This program is free software; you can redistribute it and/or
1923+ modify it under the terms of the <ulink type="help" url="gnome-help:gpl">
1924+ <citetitle>GNU General Public
1925+ License</citetitle></ulink> as published by the Free Software Foundation;
1926+ either version 2 of the License, or (at your option) any later
1927+ version.
1928+ </para>
1929+ <para>
1930+ This program is distributed in the hope that it will be useful, but
1931+ WITHOUT ANY WARRANTY; without even the implied warranty of
1932+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1933+ <citetitle>GNU General Public License</citetitle> for more details.
1934+ </para>
1935+ <para>
1936+ A copy of the <citetitle>GNU General Public License</citetitle> is
1937+ included as an appendix to the <citetitle>GNOME Users
1938+ Guide</citetitle>. You may also obtain a copy of the
1939+ <citetitle>GNU General Public License</citetitle> from the Free
1940+ Software Foundation by visiting <ulink type="http"
1941+ url="http://www.fsf.org">their Web site</ulink> or by writing to
1942+ <address>
1943+ Free Software Foundation, Inc.
1944+ 59 Temple Place - Suite 330
1945+ Boston, MA 02111-1307
1946+ USA
1947+ </address>
1948+ </para>
1949+ </sect1>
1950+</article>
1951+
1952
1953=== added file '.pc/90_fix-help-links.patch/gnibbles/help/C/index.docbook'
1954=== added file '.pc/90_fix-help-links.patch/gnibbles/help/Makefile.am'
1955--- .pc/90_fix-help-links.patch/gnibbles/help/Makefile.am 1970-01-01 00:00:00 +0000
1956+++ .pc/90_fix-help-links.patch/gnibbles/help/Makefile.am 2012-12-26 19:18:24 +0000
1957@@ -0,0 +1,18 @@
1958+@YELP_HELP_RULES@
1959+HELP_ID = gnibbles
1960+
1961+HELP_MEDIA = \
1962+ figures/game.png \
1963+ figures/intro.png \
1964+ figures/playing.png \
1965+ figures/connect.png \
1966+ figures/tables.png \
1967+ figures/worm_op.png
1968+
1969+HELP_FILES = \
1970+ gnibbles.xml \
1971+ legal.xml
1972+
1973+HELP_LINGUAS = ca cs de el en_GB es eu fr it oc sl sr sr@latin sv zh_CN
1974+
1975+-include $(top_srcdir)/git.mk
1976
1977=== added directory '.pc/90_fix-help-links.patch/gnobots2'
1978=== added directory '.pc/90_fix-help-links.patch/gnobots2/help'
1979=== added directory '.pc/90_fix-help-links.patch/gnobots2/help/C'
1980=== added file '.pc/90_fix-help-links.patch/gnobots2/help/C/gnobots2.xml'
1981--- .pc/90_fix-help-links.patch/gnobots2/help/C/gnobots2.xml 1970-01-01 00:00:00 +0000
1982+++ .pc/90_fix-help-links.patch/gnobots2/help/C/gnobots2.xml 2012-12-26 19:18:24 +0000
1983@@ -0,0 +1,666 @@
1984+<?xml version="1.0"?>
1985+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
1986+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
1987+ <!ENTITY legal SYSTEM "legal.xml">
1988+ <!ENTITY appversion "2.18">
1989+ <!ENTITY manrevision "2.9">
1990+ <!ENTITY date "August 2007">
1991+ <!ENTITY app "<application>Robots</application>">
1992+ <!ENTITY appname "Robots">
1993+]>
1994+
1995+<!--
1996+ (Do not remove this comment block.)
1997+ Maintained by the GNOME Documentation Project
1998+ http://developer.gnome.org/projects/gdp
1999+ Template version: 2.0 beta
2000+ Template last modified Feb 12, 2002
2001+-->
2002+
2003+<!-- =============Document Header ============================= -->
2004+
2005+<article id="index" lang="en">
2006+<!-- please do not change the id; for translations, change lang to -->
2007+<!-- appropriate code -->
2008+ <articleinfo>
2009+ <title>&app; Manual</title>
2010+
2011+ <abstract role="description">
2012+ <para>
2013+ Robots is a graphical version of the original text based
2014+ robots game, which can be found on a number of UNIX systems.
2015+ The player must outwit the robots chasing him/her by getting
2016+ them to run into each other.
2017+ </para>
2018+ </abstract>
2019+
2020+ <copyright>
2021+ <year>2001</year>
2022+ <holder>Patanjali Somayaji, Mark Rae</holder>
2023+ </copyright>
2024+
2025+ <!-- translators: uncomment this:
2026+
2027+ <copyright>
2028+ <year>2000</year>
2029+ <holder>ME-THE-TRANSLATOR (Latin translation)</holder>
2030+ </copyright>
2031+
2032+ -->
2033+
2034+<!-- An address can be added to the publisher information. If a role is
2035+ not specified, the publisher/author is the same for all versions of the
2036+ document. -->
2037+ <publisher>
2038+ <publishername> GNOME Documentation Project </publishername>
2039+ </publisher>
2040+
2041+ &legal;
2042+ <!-- This file contains link to license for the documentation (GNU FDL), and
2043+ other legal stuff such as "NO WARRANTY" statement. Please do not change
2044+ any of this. -->
2045+
2046+ <authorgroup>
2047+ <author role="maintainer">
2048+ <firstname>Patanjali</firstname>
2049+ <surname>Somayaji</surname>
2050+ <affiliation>
2051+ <address> <email>patanjali@mindless.com</email> </address>
2052+ </affiliation>
2053+ </author>
2054+ <author>
2055+ <firstname>Mark</firstname>
2056+ <surname>Rae</surname>
2057+ <affiliation>
2058+ <address> <email>m.rae@inpharmatica.co.uk</email> </address>
2059+ </affiliation>
2060+ </author>
2061+<!-- This is appropriate place for other contributors: translators,
2062+ maintainers, etc. Commented out by default.
2063+ <othercredit role="translator">
2064+ <firstname>Latin</firstname>
2065+ <surname>Translator 1</surname>
2066+ <affiliation>
2067+ <orgname>Latin Translation Team</orgname>
2068+ <address> <email>translator@gnome.org</email> </address>
2069+ </affiliation>
2070+ <contrib>Latin translation</contrib>
2071+ </othercredit>
2072+-->
2073+ </authorgroup>
2074+
2075+ <releaseinfo revision="2.26" role="review"/>
2076+
2077+ <revhistory>
2078+ <revision>
2079+ <revnumber>&appname; Manual V2.8</revnumber>
2080+ <date>September 2004</date>
2081+ <revdescription>
2082+ <para role="author">Patanjali Somayaji
2083+ <email>patanjali@mindless.com</email>
2084+ </para>
2085+ <para role="author">Mark Rae
2086+ <email>m.rae@inpharmatica.co.uk</email>
2087+ </para>
2088+ <para role="publisher">GNOME Documentation Project</para>
2089+ </revdescription>
2090+ </revision>
2091+ <revision>
2092+ <revnumber>&appname; Manual V&manrevision;</revnumber>
2093+ <date>&date;</date>
2094+ <revdescription>
2095+ <para role="author">Claude Paroz
2096+ <email>claude@2xlibre.net</email>
2097+ </para>
2098+ <para role="publisher">GNOME Documentation Project</para>
2099+ </revdescription>
2100+ </revision>
2101+ </revhistory>
2102+
2103+ <releaseinfo>This manual describes version &appversion; of &appname;.
2104+ </releaseinfo>
2105+ <!-- The following feedback information only applies to appliactions
2106+ listed in bugzilla.gnome.org and bugzilla.ximian.com. For other
2107+ applications, please provide your own feedback info or remove thsi
2108+ section altogether -->
2109+ <legalnotice>
2110+ <title>Feedback</title>
2111+ <para>To report a bug or make a suggestion regarding the &app; application or
2112+ this manual, follow the directions in the
2113+ <ulink url="ghelp:user-guide?feedback-bugs"
2114+ type="help">GNOME Feedback Page</ulink>.
2115+ </para>
2116+<!-- Translators may also add here feedback address for translations -->
2117+ </legalnotice>
2118+
2119+ </articleinfo>
2120+
2121+ <indexterm zone="index">
2122+ <primary>GNOME Robots</primary>
2123+ </indexterm>
2124+
2125+ <!-- ============= Document Body ============================= -->
2126+
2127+ <!-- ============= Introduction ============================== -->
2128+ <sect1 id="intro">
2129+ <title>Introduction</title>
2130+
2131+ <para>
2132+ <application>GNOME Robots</application> is a game where you try
2133+ and avoid a band of marauding robots which are,
2134+ for no adequately explained reason, trying to kill you. It is
2135+ based on the text-based robots game which can be found
2136+ on a number of UNIX systems.
2137+ </para>
2138+ <para>
2139+ This new version includes two types of robots, movable
2140+ junkheaps, multiple game configurations, user definable
2141+ keyboard layouts, and sound, as well as all of the features
2142+ which were present in the original GNOME Robots game.
2143+ </para>
2144+
2145+ <para>
2146+ To run <application>GNOME Robots</application>, select
2147+ <menuchoice>
2148+ <guisubmenu>Games</guisubmenu>
2149+ <guimenuitem>Robots</guimenuitem>
2150+ </menuchoice>
2151+ from the <guimenu>Main Menu</guimenu>, or type
2152+ <command>gnobots2</command> on the command line.
2153+ </para>
2154+
2155+ <para>
2156+ <application>GNOME Robots</application> is included in the
2157+ <filename>gnome-games</filename> package, which is part of the
2158+ GNOME desktop environment. This document describes version
2159+ &appversion; of <application>GNOME Robots</application>.
2160+ </para>
2161+ </sect1>
2162+
2163+ <sect1 id="objective">
2164+ <title>GNOME Robots Objective</title>
2165+ <para>
2166+ The objective of GNOME Robots is quite simple. You are surrounded by a
2167+ number of robots or other hostile adversaries. As you move about
2168+ they will move directly towards you for every move that you make.
2169+ Their goal is to kill you. Your goal is to kill all the robots on the
2170+ board by taking advantage of their vulnerabilities.
2171+ </para>
2172+
2173+ <para>
2174+ Robots are destroyed when they collide with each other, or when they
2175+ collide with the debris of some previous collision. You die if a robot
2176+ ends up right next to you.
2177+ </para>
2178+
2179+ <para> In some of the game configurations (you can choose from
2180+ five different sets of rules), you can push the
2181+ junkheaps around to form barricades to protect you. Also, if you
2182+ are daring enough, you can Splat! the robots by pushing
2183+ junkheaps on top of them for an additional bonus. </para>
2184+ <para>
2185+ You can also save yourself by teleporting yourself to a random location.
2186+ Unfortunately, randomly teleporting means that
2187+ you might end up being right next to a robot, so they can kill you when
2188+ they make their move. Luckily, there are also
2189+ safe teleports which will place you out of immediate danger, but
2190+ there are only a limited supply of them. You can earn
2191+ more free teleports as you go along (how you gain them depends on the
2192+ chosen game), but typically you get one for each robot that is
2193+ destroyed while you are 'waiting', up to a maximum of 10. If you don't
2194+ want to waste your saved-up safe teleports, you can choose to teleport
2195+ randomly if you think it's safe enough.
2196+ </para>
2197+
2198+ <para>
2199+ If you press the <guibutton>Wait</guibutton> button (see below) you will no longer be able to
2200+ move until either all of the robots (which still move towards you) are
2201+ gone, or you are killed. Doing this is risky, but may earn you extra
2202+ safe teleports.
2203+ </para>
2204+
2205+ <para> If you manage to reach the point where more than half of
2206+ the screen is occupied by robots, the number of robots will be
2207+ reset to the starting amount, allowing you to continue.
2208+ </para>
2209+ </sect1>
2210+
2211+
2212+ <!-- ================ Usage ================================ -->
2213+ <!-- This section should describe basic usage of the application. -->
2214+
2215+ <sect1 id="usage">
2216+ <title>Using GNOME Robots</title>
2217+ <para>
2218+ <application>GNOME Robots</application> is extremely simple to play.
2219+ You can use either the mouse or the keyboard.
2220+ This section describes basic usage of
2221+ <application>GNOME Robots</application>.
2222+ </para>
2223+
2224+ <!-- ========= Basic Usage =========================== -->
2225+ <sect2 id="mainwin">
2226+ <title>Basic usage</title>
2227+ <para>
2228+ Starting <application>GNOME Robots</application> opens the
2229+ <interface>Main window</interface>, shown in <xref
2230+ linkend="mainwindow-fig"/>.
2231+
2232+ <!-- ==== Figure ==== -->
2233+ <figure id="mainwindow-fig">
2234+ <title>GNOME Robots Main Window</title>
2235+ <screenshot>
2236+ <mediaobject>
2237+ <imageobject>
2238+ <imagedata fileref="figures/gnobots2-main.png" format="PNG" srccredit="Patanjali"/>
2239+ </imageobject>
2240+ <textobject>
2241+ <phrase>GNOME Robots Main Window.</phrase>
2242+ </textobject>
2243+ </mediaobject>
2244+ </screenshot>
2245+ </figure>
2246+ <!-- ==== End of Figure ==== -->
2247+ </para>
2248+
2249+ <para>
2250+ To start a new game, choose <guimenuitem>New</guimenuitem> in the
2251+ <guimenu>Game</guimenu> menu or click on the <guibutton>New</guibutton> button
2252+ on the toolbar.
2253+ </para>
2254+
2255+ <para>
2256+ To move, either click in the direction you want to move (the
2257+ cursor will show you which way you will go) or press the
2258+ appropriate key on the keyboard (keypad by default). Clicking on the little man
2259+ will keep you still. To teleport (safely or unsafely), and to
2260+ wait, use the buttons on the toolbar or use the items in the
2261+ <guimenu>Move</guimenu> menu.
2262+ </para>
2263+ </sect2>
2264+ </sect1>
2265+
2266+
2267+
2268+ <!-- ========= Menus =========================== -->
2269+
2270+ <sect1 id="menubar">
2271+ <title>Menus</title>
2272+ <para>
2273+ The menu bar, located at the top of the <interface>game
2274+ board</interface>, contains the following menus:
2275+ </para>
2276+
2277+
2278+ <variablelist>
2279+ <varlistentry>
2280+ <term><guimenu>Game</guimenu></term>
2281+ <listitem>
2282+ <para>
2283+ This menu contains three items:
2284+ <itemizedlist>
2285+ <listitem>
2286+ <para>
2287+ <menuchoice>
2288+ <shortcut><keysym>Ctrl-N</keysym></shortcut>
2289+ <guimenuitem>New</guimenuitem>
2290+ </menuchoice> — starts a new game of GNOME Robots.
2291+
2292+ </para>
2293+ </listitem>
2294+
2295+ <listitem>
2296+ <para>
2297+ <menuchoice>
2298+ <guimenuitem>Scores</guimenuitem>
2299+ </menuchoice> — shows the higher scores.
2300+ </para>
2301+ </listitem>
2302+
2303+ <listitem>
2304+ <para>
2305+ <menuchoice>
2306+ <shortcut><keysym>Ctrl-Q</keysym></shortcut>
2307+ <guimenuitem>Quit</guimenuitem>
2308+ </menuchoice>
2309+ </para>
2310+ </listitem>
2311+ </itemizedlist>
2312+ </para>
2313+ </listitem>
2314+ </varlistentry>
2315+
2316+ <varlistentry>
2317+ <term><guimenu>Move</guimenu></term>
2318+ <listitem>
2319+ <para>
2320+ This menu contains:
2321+ <itemizedlist>
2322+ <listitem>
2323+ <para>
2324+ <guimenuitem>Teleport</guimenuitem>—
2325+ teleports you in a safe location.
2326+ </para>
2327+ </listitem>
2328+ <listitem>
2329+ <para>
2330+ <guimenuitem>Random</guimenuitem>— teleports you in
2331+ a random location.
2332+ </para>
2333+ </listitem>
2334+ <listitem>
2335+ <para>
2336+ <guimenuitem>Wait</guimenuitem>— places you in wait mode.
2337+ </para>
2338+ </listitem>
2339+ </itemizedlist>
2340+
2341+ </para>
2342+ </listitem>
2343+ </varlistentry>
2344+
2345+ <varlistentry>
2346+ <term><guimenu>Settings</guimenu></term>
2347+ <listitem>
2348+ <para>
2349+ The <guimenu>Settings</guimenu> menu contains only one item:
2350+ <itemizedlist>
2351+ <listitem>
2352+ <para>
2353+ <guimenuitem>Preferences</guimenuitem>
2354+ which brings up the preferences dialog box.
2355+ </para>
2356+ </listitem>
2357+ </itemizedlist>
2358+ </para>
2359+ </listitem>
2360+ </varlistentry>
2361+
2362+ <varlistentry>
2363+ <term><guimenu>Help</guimenu></term>
2364+ <listitem>
2365+ <para>
2366+ This menu contains:
2367+ <itemizedlist>
2368+ <listitem>
2369+ <para>
2370+ <guimenuitem>Contents</guimenuitem>—
2371+ shows this manual.
2372+ </para>
2373+ </listitem>
2374+ <listitem>
2375+ <para>
2376+ <guimenuitem>About</guimenuitem>— shows
2377+ basic information about
2378+ <application>GNOME Robots</application>, such as
2379+ the author's name and the application version number.
2380+ </para>
2381+ </listitem>
2382+ </itemizedlist>
2383+
2384+ </para>
2385+ </listitem>
2386+ </varlistentry>
2387+ </variablelist>
2388+ </sect1>
2389+
2390+ <!-- =========Using the Keyboard============== -->
2391+
2392+
2393+ <sect1 id="keyboard">
2394+ <title>Using the keyboard</title>
2395+ <para>
2396+ You can use the keyboard to control the little man. By default, the keys from
2397+ the keypad are configured for the game. However you can customize the key
2398+ mappings in the <guimenuitem>Keyboard</guimenuitem> tab in the
2399+ <guimenuitem>Preferences</guimenuitem> dialog. To select a different key
2400+ for a command, double-click on the line for that command and then
2401+ press the key you want to use.
2402+ </para>
2403+
2404+ <sect2 id="default-keys">
2405+ <title>
2406+ Default Key Mappings
2407+ </title>
2408+ <para>
2409+ By default, you use the numeric keypad on the
2410+ right-hand side of the keyboard (not the separate arrow keys).
2411+ <note>
2412+ <title>Switch off the NumLock Key</title>
2413+ <para>
2414+ You may need to switch off the NumLock to make these work.
2415+ </para>
2416+ </note>
2417+ <orderedlist>
2418+ <listitem><para>
2419+ Up Left: <keycap>Home</keycap>
2420+ </para></listitem>
2421+ <listitem><para>
2422+ Up: <keycap>Up</keycap>
2423+ </para></listitem>
2424+ <listitem><para>
2425+ Up Right: <keycap>Page Up</keycap>
2426+ </para></listitem>
2427+ <listitem><para>
2428+ Left: <keycap>Left</keycap>
2429+ </para></listitem>
2430+ <listitem><para>
2431+ Stand Still: <keycap>Begin</keycap>
2432+ </para></listitem>
2433+ <listitem><para>
2434+ Right: <keycap>Right</keycap>
2435+ </para></listitem>
2436+ <listitem><para>
2437+ Down Left: <keycap>End</keycap>
2438+ </para></listitem>
2439+ <listitem><para>
2440+ Down: <keycap>Down</keycap>
2441+ </para></listitem>
2442+ <listitem><para>
2443+ Down Right: <keycap>Page Down</keycap>
2444+ </para></listitem>
2445+ <listitem><para>
2446+ Teleport: <keycap>+</keycap>
2447+ </para></listitem>
2448+ <listitem><para>
2449+ Randomly Teleport: <keycap>*</keycap>
2450+ </para></listitem>
2451+ <listitem><para>
2452+ Wait: <keycap>Enter</keycap>
2453+ </para></listitem>
2454+ </orderedlist>
2455+
2456+ </para>
2457+ </sect2>
2458+
2459+
2460+ </sect1>
2461+
2462+ <!-- ============= Customization ============================= -->
2463+
2464+ <sect1 id="customization">
2465+ <title>Customizing GNOME Robots</title>
2466+ <para>
2467+ You can modify the behaviour and appearance of
2468+ the game by selecting <guimenuitem>
2469+ Preferences</guimenuitem>
2470+ under the <guimenu>Settings</guimenu> menu. This brings up a
2471+ dialog with three tabs:
2472+ <itemizedlist>
2473+ <listitem>
2474+ <para>
2475+ <guimenuitem>Game</guimenuitem> — This page allows
2476+ you to choose the type of game you want to play. The
2477+ drop-down box at the top of the page allows you to choose from
2478+ a number of predefined games. You can't change these options in
2479+ the middle of a game, so they will be disabled then. There are
2480+ also several options at the bottom of the dialog:
2481+
2482+
2483+ <orderedlist>
2484+ <listitem><para> The safe moves option will help you to
2485+ avoid being killed due to a mistake. If you try to make a
2486+ move that would lead to your death when there is a safe
2487+ move available, you will not be allowed to proceed. But be
2488+ warned: if there was no safe move available, other than
2489+ teleporting, the move will be allowed to proceed.
2490+
2491+ </para></listitem>
2492+ <listitem><para>
2493+
2494+ There is also a <quote>super safe mode</quote>. If you select this,
2495+ you get beeped when there is no safe move and your only
2496+ option is to teleport out.
2497+
2498+ </para></listitem>
2499+ <listitem><para>
2500+
2501+ If you select the sound checkbox the game will play
2502+ sounds for various events throughout the game.
2503+
2504+ </para></listitem>
2505+ <listitem><para>
2506+
2507+ The <quote>Splats</quote> checkbox selects whether you want the sound
2508+ played and a small <quote>Splat!</quote> to appear on the screen.
2509+
2510+ </para></listitem>
2511+ </orderedlist>
2512+
2513+ </para>
2514+ </listitem>
2515+ <listitem>
2516+ <para>
2517+ <guimenuitem>Appearance</guimenuitem> — This page
2518+ allows you to select the graphics used throughout the game
2519+ from the list in the dropdown-box. You can also select the
2520+ background colour from this tab.
2521+ </para>
2522+ </listitem>
2523+
2524+ <listitem>
2525+
2526+ <para>
2527+ <guimenuitem>Keyboard</guimenuitem> —
2528+ This screen allows you to define your own keyboard
2529+ controls. To select a different key
2530+ for a command, double-click on the button for that command and then
2531+ press the key you want to use.
2532+ </para>
2533+ </listitem>
2534+ </itemizedlist>
2535+ </para>
2536+
2537+ <para>
2538+Any changes you make take effect immediately and are automatically saved.
2539+</para>
2540+
2541+ <para>
2542+ You can design your own graphics for the game if you want. The graphics
2543+ files are found in
2544+ <filename class="directory">
2545+ $PREFIX/share/gnome-games/gnobots2/pixmaps
2546+ </filename>, where $PREFIX is the prefix into which GNOME
2547+ was installed. This is usually either
2548+ <filename class="directory">/usr</filename>
2549+ or
2550+ <filename class="directory">/usr/local</filename>.
2551+ </para>
2552+ <para>
2553+ Each character is 16x16 pixels and there are 14 of them arranged in
2554+ a PNG file which is 224x16 pixels in size. You can look at the existing
2555+ files to see the order in which they must be arranged to produce the correct
2556+ animated sequences.
2557+ </para>
2558+ <para>
2559+ Any graphics files which are placed in the directory are auto-detected,
2560+ so you don't need to alter any configuration files.
2561+ You can also define your own game configurations by creating extra
2562+ <filename>
2563+ .cfg
2564+ </filename> files which are stored in the
2565+ <filename class="directory">
2566+ $PREFIX/share/gnome-games/gnobots2/games
2567+ </filename>
2568+ directory.
2569+ </para>
2570+ </sect1>
2571+
2572+ <!-- ============= Various Sections ============================= -->
2573+
2574+
2575+ <!-- ============= Bugs ================================== -->
2576+ <!-- This section should describe known bugs and limitations of
2577+ the program if there are any - please be frank and list all
2578+ problems you know of. -->
2579+<!-- <sect1 id="bugs">
2580+ <title>Known Bugs and Limitations</title>
2581+ <para>
2582+ This application has no known bugs.
2583+ </para>
2584+ </sect1>
2585+-->
2586+
2587+<!-- ============= Authors ================================ -->
2588+
2589+ <sect1 id="authors">
2590+ <title>Authors</title>
2591+ <para>
2592+ <application>GNOME Robots</application> was written by Mark Rae
2593+ (<email>m.rae@inpharmatica.co.uk</email>).
2594+ This manual was written by Patanjali Somayaji
2595+ (<email>patanjali@mindless.com</email>), from the original
2596+ HTML documentation by Mark Rae.
2597+ To report a bug or make a suggestion regarding this application or
2598+ this manual, follow the directions in this
2599+ <ulink url="ghelp:user-guide?feedback-bugs" type="help">document</ulink>.
2600+ </para>
2601+
2602+ <!-- For translations: uncomment this:
2603+
2604+ <para>
2605+ Latin translation was done by ME
2606+ (<email>MYNAME@MYADDRESS</email>). Please send all comments and
2607+ suggestions regarding this translation to SOMEWHERE.
2608+ </para>
2609+
2610+ -->
2611+
2612+ </sect1>
2613+
2614+
2615+ <!-- ============= Application License ============================= -->
2616+
2617+ <sect1 id="license">
2618+ <title>License</title>
2619+ <para>
2620+ This program is free software; you can redistribute it and/or
2621+ modify it under the terms of the <ulink type="help" url="gnome-help:gpl">
2622+ <citetitle>GNU General Public License</citetitle></ulink> as
2623+ published by the Free Software Foundation;
2624+ either version 2 of the License, or (at your option) any later
2625+ version.
2626+ </para>
2627+ <para>
2628+ This program is distributed in the hope that it will be useful, but
2629+ WITHOUT ANY WARRANTY; without even the implied warranty of
2630+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2631+ <citetitle>GNU General Public License</citetitle> for more details.
2632+ </para>
2633+ <para>
2634+ A copy of the <citetitle>GNU General Public License</citetitle> is
2635+ included as an appendix to the <citetitle>GNOME Users
2636+ Guide</citetitle>. You may also obtain a copy of the
2637+ <citetitle>GNU General Public License</citetitle> from the Free
2638+ Software Foundation by visiting <ulink type="http"
2639+ url="http://www.fsf.org">their Web site</ulink> or by writing to
2640+ <address>
2641+ Free Software Foundation, Inc.
2642+ <street>51 Franklin Street, Fifth Floor</street>
2643+ <city>Boston</city>, <state>MA</state> <postcode>02110-1301</postcode>
2644+ <country>USA</country>
2645+ </address>
2646+ </para>
2647+ </sect1>
2648+
2649+</article>
2650
2651=== added file '.pc/90_fix-help-links.patch/gnobots2/help/C/index.docbook'
2652=== added file '.pc/90_fix-help-links.patch/gnobots2/help/Makefile.am'
2653--- .pc/90_fix-help-links.patch/gnobots2/help/Makefile.am 1970-01-01 00:00:00 +0000
2654+++ .pc/90_fix-help-links.patch/gnobots2/help/Makefile.am 2012-12-26 19:18:24 +0000
2655@@ -0,0 +1,13 @@
2656+@YELP_HELP_RULES@
2657+HELP_ID = gnobots2
2658+
2659+HELP_MEDIA = \
2660+ figures/gnobots2-main.png
2661+
2662+HELP_FILES = \
2663+ gnobots2.xml \
2664+ legal.xml
2665+
2666+HELP_LINGUAS = ca cs da de el en_GB es eu fr it oc sl sr sr@latin sv zh_CN
2667+
2668+-include $(top_srcdir)/git.mk
2669
2670=== added directory '.pc/90_fix-help-links.patch/gnotski'
2671=== added directory '.pc/90_fix-help-links.patch/gnotski/help'
2672=== added directory '.pc/90_fix-help-links.patch/gnotski/help/C'
2673=== added file '.pc/90_fix-help-links.patch/gnotski/help/C/gnotski.xml'
2674--- .pc/90_fix-help-links.patch/gnotski/help/C/gnotski.xml 1970-01-01 00:00:00 +0000
2675+++ .pc/90_fix-help-links.patch/gnotski/help/C/gnotski.xml 2012-12-26 19:18:24 +0000
2676@@ -0,0 +1,407 @@
2677+<?xml version="1.0"?>
2678+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
2679+"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
2680+ <!ENTITY legal SYSTEM "legal.xml">
2681+ <!ENTITY appversion "2.12">
2682+ <!ENTITY manrevision "2.10">
2683+ <!ENTITY date "March 2004">
2684+ <!ENTITY app "<application>Klotski</application>">
2685+ <!-- Information about the entities
2686+ The legal.xml file contains legal information, there is no need to edit the file.
2687+ Use the appversion entity to specify the version of the application.
2688+ Use the manrevision entity to specify the revision number of this manual.
2689+ Use the date entity to specify the release date of this manual.
2690+ Use the app entity to specify the name of the application. -->
2691+]>
2692+
2693+<!--
2694+ Maintained by the GNOME Documentation Project
2695+ http://developer.gnome.org/projects/gdp
2696+ Template version: 2.0 beta
2697+ Template last modified Apr 11, 2002
2698+-->
2699+<!-- =============Document Header ============================= -->
2700+<article id="index" lang="en">
2701+<!-- please do not change the id; for translations, change lang to -->
2702+<!-- appropriate code -->
2703+ <articleinfo>
2704+ <title>&app; Manual</title>
2705+
2706+ <abstract role="description">
2707+ <para>
2708+ Klotski is a puzzle game of which the objective is to get the
2709+ patterned block to the marker, which is done by moving the blocks
2710+ in its way.
2711+ </para>
2712+ </abstract>
2713+
2714+ <copyright>
2715+ <year>2002</year>
2716+ <holder>Andrew Sobala</holder>
2717+ </copyright>
2718+<!-- translators: uncomment this:
2719+
2720+ <copyright>
2721+ <year>2002</year>
2722+ <holder>ME-THE-TRANSLATOR (Latin translation)</holder>
2723+ </copyright>
2724+
2725+ -->
2726+<!-- An address can be added to the publisher information. If a role is
2727+ not specified, the publisher/author is the same for all versions of the
2728+ document. -->
2729+ <publisher>
2730+ <publishername> GNOME Documentation Project </publishername>
2731+ </publisher>
2732+
2733+ &legal;
2734+ <!-- This file contains link to license for the documentation (GNU FDL), and
2735+ other legal stuff such as "NO WARRANTY" statement. Please do not change
2736+ any of this. -->
2737+
2738+ <authorgroup>
2739+ <author>
2740+ <firstname>Andrew</firstname>
2741+ <surname>Sobala</surname>
2742+ <affiliation>
2743+ <orgname>GNOME Documentation Project</orgname>
2744+ <address> <email>andrew@sobala.net</email> </address>
2745+ </affiliation>
2746+ </author>
2747+
2748+ <othercredit role="author">
2749+ <firstname>Lars</firstname>
2750+ <surname>Rydlinge</surname>
2751+ <affiliation>
2752+ <orgname>GNOME Project</orgname>
2753+ <address> <email> Lars.Rydlinge@HIG.SE </email> </address>
2754+ </affiliation>
2755+ </othercredit>
2756+
2757+ <othercredit role="maintainer">
2758+ <firstname>Ross</firstname>
2759+ <surname>Burton</surname>
2760+ <affiliation>
2761+ <orgname>GNOME Project</orgname>
2762+ <address> <email> ross@burtonini.com </email> </address>
2763+ </affiliation>
2764+ </othercredit>
2765+
2766+<!-- This is appropriate place for other contributors: translators,
2767+ maintainers, etc.
2768+
2769+ <othercredit role="translator">
2770+ <firstname>Latin</firstname>
2771+ <surname>Translator 1</surname>
2772+ <affiliation>
2773+ <orgname>Latin Translation Team</orgname>
2774+ <address> <email>translator@gnome.org</email> </address>
2775+ </affiliation>
2776+ <contrib>Latin translation</contrib>
2777+ </othercredit>
2778+-->
2779+ </authorgroup>
2780+
2781+ <releaseinfo revision="2.26" role="review"/>
2782+
2783+
2784+<!-- According to GNU FDL, revision history is mandatory if you are -->
2785+<!-- modifying/reusing someone else's document. If not, you can omit it. -->
2786+<!-- Remember to remove the &manrevision; entity from the revision entries other
2787+-->
2788+<!-- than the current revision. -->
2789+<!-- The revision numbering system for GNOME manuals is as follows: -->
2790+<!-- * the revision number consists of two components -->
2791+<!-- * the first component of the revision number reflects the release version of the GNOME desktop. -->
2792+<!-- * the second component of the revision number is a decimal unit that is incremented with each revision of the manual. -->
2793+<!-- For example, if the GNOME desktop release is V2.x, the first version of the manual that -->
2794+<!-- is written in that desktop timeframe is V2.0, the second version of the manual is V2.1, etc. -->
2795+<!-- When the desktop release version changes to V3.x, the revision number of the manual changes -->
2796+<!-- to V3.0, and so on. -->
2797+ <revhistory>
2798+<!--
2799+ <revision>
2800+ <revnumber>Full title of previous manual.</revnumber>
2801+ <date>Release date of previous manual.</date>
2802+ <revdescription>
2803+ <para role="author">Documentation Writer 1
2804+ <email>docwriter1@gnome.org</email>
2805+ </para>
2806+ <para role="publisher">GNOME Documentation Project</para>
2807+ </revdescription>
2808+ </revision>
2809+-->
2810+
2811+ <revision>
2812+ <revnumber>V2.0</revnumber>
2813+ <date>13 August 2002</date>
2814+ <revdescription>
2815+ <para role="author">Andrew Sobala
2816+ <email>andrew@sobala.net</email>
2817+ </para>
2818+ <para role="publisher">GNOME Documentation Project</para>
2819+ </revdescription>
2820+ </revision>
2821+
2822+ </revhistory>
2823+
2824+ <releaseinfo>This manual describes version &appversion; of GNOME Klotski.
2825+ </releaseinfo>
2826+ <legalnotice>
2827+ <title>Feedback</title>
2828+ <para>To report a bug or make a suggestion regarding the &app; application or
2829+ this manual, follow the directions in the <ulink url="ghelp:user-guide?feedback-bugs"
2830+ type="help">GNOME Feedback Page</ulink>.
2831+ </para>
2832+<!-- Translators may also add here feedback address for translations -->
2833+ </legalnotice>
2834+ </articleinfo>
2835+
2836+ <indexterm zone="index">
2837+ <primary>GNOME Klotski</primary>
2838+ </indexterm>
2839+
2840+<!-- ============= Document Body ============================= -->
2841+<!-- ============= Introduction ============================== -->
2842+ <sect1 id="gnotski-introduction">
2843+ <title>Introduction</title>
2844+ <para>The &app; application is a clone of the Klotski game. The objective is to move the patterned block to
2845+ the area bordered by green markers.</para>
2846+
2847+ <para> &app; was written by Lars Rydlinge
2848+ (<email>Lars.Rydlinge@HIG.SE</email>).</para>
2849+
2850+ <para>&app; is included in the gnome-games package, which is part of the GNOME desktop environment.
2851+ This document describes version &appversion; of &app;. </para>
2852+
2853+ <para> This program is distributed under the terms of the GNU
2854+ General Public license as published by the Free Software
2855+ Foundation; either version 2 of the License, or (at your option)
2856+ any later version. A copy of this license can be found at this
2857+ <ulink url="ghelp:gpl" type="help">link</ulink>, or in the file
2858+ COPYING included with the source code of this program. </para>
2859+
2860+ <para>
2861+ To report a bug or make a suggestion regarding this application or
2862+ this manual, follow the directions in this
2863+ <ulink url="ghelp:user-guide?feedback-bugs" type="help">document</ulink>.
2864+ </para>
2865+ </sect1>
2866+
2867+<!-- ===========Objective ============================== -->
2868+<sect1 id="gnotski-objective">
2869+ <title>Objective</title>
2870+ <para>The objective of &app; is to move the patterned block to the green markers in as few moves as
2871+ possible. You do this by moving the blocks one at a time with the mouse until you can get the patterned
2872+ block to the markers.
2873+
2874+ <!-- ==== Figure ==== -->
2875+ <figure id="gnotski-figure-win">
2876+ <title>The winning move</title>
2877+ <screenshot>
2878+ <mediaobject>
2879+ <imageobject>
2880+ <imagedata fileref="figures/gnotski_win.png" format="PNG"/>
2881+ </imageobject>
2882+ <textobject>
2883+ <phrase>The patterned block should be moved to the space bordered by the green
2884+ markers.</phrase>
2885+ </textobject>
2886+ </mediaobject>
2887+ </screenshot>
2888+ </figure></para>
2889+ <!-- ==== End of Figure ==== -->
2890+</sect1>
2891+
2892+<!-- =========== Getting Started ============================== -->
2893+
2894+ <sect1 id="gnotski-playing">
2895+ <title>Playing &app;</title>
2896+ <para>
2897+ <itemizedlist>
2898+ <listitem>
2899+ <para>
2900+ <xref linkend="gnotski-start"/></para>
2901+ </listitem>
2902+ <listitem>
2903+ <para>
2904+ <xref linkend="gnotski-ui"/></para>
2905+ </listitem>
2906+ <listitem>
2907+ <para>
2908+ <xref linkend="gnotski-new-game"/></para>
2909+ </listitem>
2910+ <listitem>
2911+ <para>
2912+ <xref linkend="gnotski-moving"/></para>
2913+ </listitem>
2914+ </itemizedlist> </para>
2915+
2916+ <!-- =========== To start gnotski ============================== -->
2917+ <sect2 id="gnotski-start">
2918+ <title>To Start &app;</title>
2919+ <para>You can start &app; from the Applications menu by choosing
2920+ <menuchoice>
2921+ <guisubmenu>Games</guisubmenu>
2922+ <guimenuitem>Gnotski</guimenuitem>
2923+ </menuchoice>.</para>
2924+ </sect2>
2925+
2926+ <!-- =========== The main window ============================== -->
2927+ <sect2 id="gnotski-ui">
2928+ <title>The main window</title>
2929+ <para>When you start <application>&app;</application>, the following window is displayed.</para>
2930+
2931+ <!-- ==== Figure ==== -->
2932+ <figure id="gnotski-figure-mainwindow">
2933+ <title>&app; Start Up Window</title>
2934+ <screenshot>
2935+ <mediaobject>
2936+ <imageobject>
2937+ <imagedata fileref="figures/gnotski_start_window.png" format="PNG"/>
2938+ </imageobject>
2939+ <textobject>
2940+ <phrase>Shows &app; main window. Contains titlebar, menubar, game area
2941+ and statusbar. Menubar contains Game and Help menus. </phrase>
2942+ </textobject>
2943+ </mediaobject>
2944+ </screenshot>
2945+ </figure>
2946+ <!-- ==== End of Figure ==== -->
2947+
2948+ <para>The &app; window contains the following elements:
2949+ <variablelist>
2950+ <varlistentry>
2951+ <term>Menubar</term>
2952+ <listitem>
2953+ <variablelist>
2954+ <varlistentry>
2955+ <term>Game menu</term>
2956+ <listitem>
2957+ <para>The game menu allows you to start new games, view the highest scores and
2958+ quit the program.</para>
2959+ </listitem>
2960+ </varlistentry>
2961+ <varlistentry>
2962+ <term>Help menu</term>
2963+ <listitem>
2964+ <para>The help menu allows you to view the documentation for &app;</para>
2965+ </listitem>
2966+ </varlistentry>
2967+ </variablelist>
2968+ </listitem>
2969+ </varlistentry>
2970+ <varlistentry>
2971+ <term>Game area</term>
2972+ <listitem>
2973+ <para>The game area shows the blocks in the current game. You can drag the blocks around with
2974+ the mouse as described in <xref linkend="gnotski-moving"/>.
2975+ </para>
2976+ </listitem>
2977+ </varlistentry>
2978+ <varlistentry>
2979+ <term>Statusbar</term>
2980+ <listitem>
2981+ <para>The statusbar shows how many moves you have taken so far.</para>
2982+ </listitem>
2983+ </varlistentry>
2984+ </variablelist></para>
2985+
2986+ </sect2>
2987+
2988+ <!-- =========== Starting a new game ============================== -->
2989+ <sect2 id="gnotski-new-game">
2990+ <title>Starting a new game</title>
2991+ <para>Use the <guimenu>Game menu</guimenu> to start a new game. The items
2992+ <guimenuitem>Next Puzzle</guimenuitem> and <guimenuitem>Previous Puzzle</guimenuitem> allows you to
2993+ navigate the puzzles sequentially. Each puzzle belongs to one of the three categories found in the
2994+ submenus named <guisubmenu>HuaRong Trail</guisubmenu>, <guisubmenu>Challenge Pack</guisubmenu> and
2995+ <guisubmenu>Skill Pack</guisubmenu>.In these submenus,
2996+ each puzzle name refers to a game scenario.
2997+ </para>
2998+ <example>
2999+ <title>Starting a game</title>
3000+ <para>To start a game, choose
3001+ <menuchoice>
3002+ <guimenu>Game</guimenu>
3003+ <guisubmenu>[category]</guisubmenu>
3004+ <guimenuitem>[game scenario]</guimenuitem>
3005+ </menuchoice>
3006+ </para></example>
3007+ </sect2>
3008+
3009+ <!-- ===========Moving blocks ============================== -->
3010+ <sect2 id="gnotski-moving">
3011+ <title>Moving blocks</title>
3012+ <para>To move a block, click on it, hold down the mouse button and drag it to its new location.
3013+ You cannot move the green blocks or the block that borders the game. You cannot move a block to a
3014+ space already occupied by another block, with the exception that you may move the patterned block
3015+ through the green blocks to win.
3016+ </para>
3017+ </sect2>
3018+
3019+</sect1>
3020+
3021+<!-- Known bugs. Try to manage user expectations and warn them of known bugs
3022+but it is better to omit this section than give a false sense of perfection
3023+<sect1 id="gnotski-bugs">
3024+ <title>Known Bugs and Limitations</title>
3025+ <para>
3026+ There are no known bugs in this game.
3027+ </para>
3028+</sect1>
3029+-->
3030+
3031+<sect1 id="authors">
3032+ <title>Authors</title>
3033+ <para>
3034+ <application>Klotski</application> was written by Lars Rydlinge
3035+ (<email>lars.rydlinge@hig.se</email>). This manual was written by Andrew Sobala.
3036+ To report a bug or make a suggestion regarding this application or
3037+ this manual, follow the directions in this
3038+ <ulink url="ghelp:user-guide?feedback-bugs" type="help">document</ulink>.
3039+ </para>
3040+
3041+ <!-- For translations: uncomment this:
3042+
3043+ <para>
3044+ Latin translation was done by ME
3045+ (<email>MYNAME@MYADDRESS</email>). Please send all comments and
3046+ suggestions regarding this translation to SOMEWHERE.
3047+ </para>
3048+
3049+ -->
3050+</sect1>
3051+
3052+ <sect1 id="license">
3053+ <title>License</title>
3054+ <para>
3055+ This program and tile artwork is free software; you can redistribute it and/or
3056+ modify it under the terms of the <citetitle>GNU General Public
3057+ License</citetitle> as published by the Free Software Foundation;
3058+ either version 2 of the License, or (at your option) any later
3059+ version.
3060+ </para>
3061+ <para>
3062+ This program is distributed in the hope that it will be useful, but
3063+ WITHOUT ANY WARRANTY; without even the implied warranty of
3064+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3065+ <citetitle>GNU General Public License</citetitle> for more details.
3066+ </para>
3067+ <para>
3068+ A copy of the <citetitle>GNU General Public License</citetitle> is
3069+ included as an appendix to the <citetitle>GNOME Users
3070+ Guide</citetitle>. You may also obtain a copy of the
3071+ <citetitle>GNU General Public License</citetitle> from the Free
3072+ Software Foundation by visiting <ulink type="http"
3073+ url="http://www.fsf.org">their Web site</ulink> or by writing to
3074+ <address>
3075+ Free Software Foundation, Inc.
3076+ <street>59 Temple Place</street> - Suite 330
3077+ <city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode>
3078+ <country>USA</country>
3079+ </address>
3080+ </para>
3081+ </sect1>
3082+
3083+</article>
3084
3085=== added file '.pc/90_fix-help-links.patch/gnotski/help/C/index.docbook'
3086=== added file '.pc/90_fix-help-links.patch/gnotski/help/Makefile.am'
3087--- .pc/90_fix-help-links.patch/gnotski/help/Makefile.am 1970-01-01 00:00:00 +0000
3088+++ .pc/90_fix-help-links.patch/gnotski/help/Makefile.am 2012-12-26 19:18:24 +0000
3089@@ -0,0 +1,14 @@
3090+@YELP_HELP_RULES@
3091+HELP_ID = gnotski
3092+
3093+HELP_MEDIA = \
3094+ figures/gnotski_start_window.png \
3095+ figures/gnotski_win.png
3096+
3097+HELP_FILES = \
3098+ gnotski.xml \
3099+ legal.xml
3100+
3101+HELP_LINGUAS = ca cs da de el en_GB es eu fr it oc sl sr sr@latin sv zh_CN
3102+
3103+-include $(top_srcdir)/git.mk
3104
3105=== added directory '.pc/90_fix-help-links.patch/gtali'
3106=== added directory '.pc/90_fix-help-links.patch/gtali/help'
3107=== added directory '.pc/90_fix-help-links.patch/gtali/help/C'
3108=== added file '.pc/90_fix-help-links.patch/gtali/help/C/gtali.xml'
3109--- .pc/90_fix-help-links.patch/gtali/help/C/gtali.xml 1970-01-01 00:00:00 +0000
3110+++ .pc/90_fix-help-links.patch/gtali/help/C/gtali.xml 2012-12-26 19:18:24 +0000
3111@@ -0,0 +1,492 @@
3112+<?xml version="1.0"?>
3113+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3114+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
3115+ <!ENTITY legal SYSTEM "legal.xml">
3116+ <!ENTITY appversion "2.12">
3117+ <!ENTITY manrevision "2.8">
3118+ <!ENTITY date "September 2004">
3119+ <!ENTITY app "<application>Tali</application>">
3120+ <!ENTITY appname "Tali">
3121+ <!ENTITY version "2.8">
3122+]>
3123+
3124+<!--
3125+ (Do not remove this comment block.)
3126+ Maintained by the GNOME Documentation Project
3127+ http://developer.gnome.org/projects/gdp
3128+ Template version: 2.0 beta
3129+ Template last modified Feb 12, 2002
3130+-->
3131+
3132+<!-- =============Document Header ============================= -->
3133+
3134+<article id="index" lang="en">
3135+<!-- please do not change the id; for translations, change lang to -->
3136+<!-- appropriate code -->
3137+ <articleinfo>
3138+ <title>&app; Manual</title>
3139+ <abstract role="description">
3140+ <para>
3141+ Tali is like Yahtzee for GNOME or like poker with dice. The player
3142+ rolls dice to try to make the best possible combinations, like
3143+ 4 of a kind, small straight, and full house. The player is allowed
3144+ 3 rolls per turn and can hold certain dice with each roll.
3145+ </para>
3146+ </abstract>
3147+ <copyright>
3148+ <year>2001</year>
3149+ <holder>Scott D. Heavner</holder>
3150+ </copyright>
3151+
3152+ <!-- translators: uncomment this:
3153+
3154+ <copyright>
3155+ <year>2000</year>
3156+ <holder>ME-THE-TRANSLATOR (Latin translation)</holder>
3157+ </copyright>
3158+
3159+ -->
3160+<!-- An address can be added to the publisher information. If a role is
3161+ not specified, the publisher/author is the same for all versions of the
3162+ document. -->
3163+ <publisher>
3164+ <publishername> GNOME Documentation Project </publishername>
3165+ </publisher>
3166+
3167+ &legal;
3168+ <!-- This file contains link to license for the documentation (GNU FDL), and
3169+ other legal stuff such as "NO WARRANTY" statement. Please do not change
3170+ any of this. -->
3171+
3172+ <authorgroup>
3173+ <author role="maintainer">
3174+ <firstname>Scott D</firstname>
3175+ <surname>Heavner</surname>
3176+ <affiliation>
3177+ <address> <email>sdh@po.cwru.edu</email> </address>
3178+ </affiliation>
3179+ </author>
3180+<!-- This is appropriate place for other contributors: translators,
3181+ maintainers, etc. Commented out by default.
3182+ <othercredit role="translator">
3183+ <firstname>Latin</firstname>
3184+ <surname>Translator 1</surname>
3185+ <affiliation>
3186+ <orgname>Latin Translation Team</orgname>
3187+ <address> <email>translator@gnome.org</email> </address>
3188+ </affiliation>
3189+ <contrib>Latin translation</contrib>
3190+ </othercredit>
3191+-->
3192+ </authorgroup>
3193+
3194+ <releaseinfo revision="2.26" role="review"/>
3195+
3196+ <revhistory>
3197+ <revision>
3198+ <revnumber>&appname; Manual V&manrevision;</revnumber>
3199+ <date>&date;</date>
3200+ <revdescription>
3201+ <para role="author">Scott D Heavner
3202+ <email>sdh@po.cwru.edu</email>
3203+ </para>
3204+ <para role="publisher">GNOME Documentation Project</para>
3205+ </revdescription>
3206+ </revision>
3207+ </revhistory>
3208+
3209+ <releaseinfo>This manual describes version &appversion; of &appname;.
3210+ </releaseinfo>
3211+ <!-- The following feedback information only applies to appliactions
3212+ listed in bugzilla.gnome.org and bugzilla.ximian.com. For other
3213+ applications, please provide your own feedback info or remove thsi
3214+ section altogether -->
3215+ <legalnotice>
3216+ <title>Feedback</title>
3217+ <para>To report a bug or make a suggestion regarding the &app; application or
3218+ this manual, follow the directions in the
3219+ <ulink url="ghelp:user-guide?feedback-bugs"
3220+ type="help">GNOME Feedback Page</ulink>.
3221+ </para>
3222+<!-- Translators may also add here feedback address for translations -->
3223+ </legalnotice>
3224+
3225+ </articleinfo>
3226+
3227+ <indexterm zone="index">
3228+ <primary>GNOME Tali</primary>
3229+ </indexterm>
3230+
3231+ <!-- ============= Document Body ============================= -->
3232+
3233+ <sect1 id="intro">
3234+ <title>Introduction</title>
3235+
3236+ <para>
3237+ <application>GNOME Tali</application> is a sort of poker with
3238+ dice and less money. You roll five dice three times and try to
3239+ create the best <quote>hand</quote>. Your two rerolls may include
3240+ any or all of your dice.
3241+ </para>
3242+ <para>
3243+ <application>GNOME Tali</application> is very similar to the
3244+ dice game Yahtzee which is a trademark of Hasbro, Inc.
3245+ </para>
3246+
3247+ <para>
3248+ To run <application>GNOME Tali</application>, select
3249+ <menuchoice>
3250+ <guisubmenu>Games</guisubmenu>
3251+ <guimenuitem>GNOME Tali</guimenuitem>
3252+ </menuchoice>
3253+ from the <guimenu>Main Menu</guimenu>, or type
3254+ <command>gtali</command> on the command line.
3255+ </para>
3256+
3257+ <para>
3258+ <application>GNOME Tali</application> is included in the
3259+ <filename>gnome-games</filename> package, which is part of the
3260+ GNOME desktop environment. This document describes version
3261+ &version; of <application>GNOME Tali</application>.
3262+ </para>
3263+ </sect1>
3264+
3265+ <sect1 id="playing">
3266+ <title>Playing GNOME Tali</title>
3267+
3268+ <figure id="shot1">
3269+ <title>GNOME Tali in action</title>
3270+ <screenshot>
3271+ <mediaobject>
3272+ <imageobject>
3273+ <imagedata fileref="figures/mainwindow.png" format="PNG"
3274+ srccredit="Trevor Curtis"/>
3275+ </imageobject>
3276+ <textobject>
3277+ <phrase>GNOME Tali main window screenshot.</phrase>
3278+ </textobject>
3279+ </mediaobject>
3280+ </screenshot>
3281+ </figure>
3282+
3283+ <para>
3284+ When play starts, you see the results of your first throw of the
3285+ dice.
3286+ </para>
3287+
3288+ <orderedlist>
3289+ <listitem>
3290+ <para>Click on the dice you wish to roll again.
3291+ </para>
3292+ </listitem>
3293+ <listitem>
3294+ <para>When you have selected all the dice you wish to reroll,
3295+ press the <guibutton>Roll!</guibutton> button.
3296+ </para>
3297+ </listitem>
3298+ <listitem>
3299+ <para>When you have a hand you like or have run out of chances
3300+ to throw the dice, click on a row corresponding to what you think
3301+ is your best scoring combination. It is very possible to have
3302+ a score of zero and if you click on the wrong row, you
3303+ will be scored accordingly. (Say for example, you get
3304+ yahtzee -- 5 of a kind -- and click on the large straight row,
3305+ you will receive a zero in your large straight score).</para>
3306+ </listitem>
3307+ </orderedlist>
3308+
3309+ <para>You can only use each combination once, i.e. once you've entered
3310+ something in a slot, you can't change the score later if you roll a
3311+ better hand.
3312+ </para>
3313+
3314+ <para>There is one exception to this rule, if you roll a yahtzee a
3315+ second time you can put it in the yahtzee row again for an extra
3316+ fifty points. You can keep doing this each time you get another
3317+ yahtzee. At the end of the game you will be given extra rolls to
3318+ fill in the other rows. Be warned that if you score zero in your
3319+ yahtzee row (i.e. you filled that row with something that wasn't
3320+ a yahtzee) then you can't put a yahtzee in afterward, zero is all
3321+ you will score.
3322+ </para>
3323+
3324+ <para>There is also a bonus of 35 points if you score a total of
3325+ 63 points or more in the top six rows.
3326+ </para>
3327+
3328+ <sect2 id="keyboard">
3329+ <title>Using the keyboard</title>
3330+
3331+ <para>As an alternative to using the mouse, the keys 1 through 5
3332+ toggle the dice just as if you had clicked them. The key 1
3333+ corresponds to the first die and so on. Use the usual controls to
3334+ roll the dice and select a row. i.e. use tab to switch between the
3335+ roll button and the score area, use the arrow keys to navigate up
3336+ and down the rows and use space to select.</para>
3337+
3338+ </sect2>
3339+
3340+ </sect1>
3341+
3342+ <sect1 id="options">
3343+ <title>Game Options</title>
3344+
3345+ <figure id="shot2">
3346+ <title>GNOME Tali preferences</title>
3347+ <screenshot>
3348+ <mediaobject>
3349+ <imageobject>
3350+ <imagedata fileref="figures/preferences.png" format="PNG"
3351+ srccredit="Trevor Curtis"/>
3352+ </imageobject>
3353+ <textobject>
3354+ <phrase>GNOME Tali preferences dialog box.</phrase>
3355+ </textobject>
3356+ </mediaobject>
3357+ </screenshot>
3358+ </figure>
3359+ <variablelist><title>Human Players</title>
3360+ <varlistentry>
3361+ <term><guimenuitem>Number of players</guimenuitem></term>
3362+ <listitem>
3363+ <para>Selects the number of human players. As described
3364+ above you are only allowed six total
3365+ players.
3366+ </para>
3367+ </listitem>
3368+ </varlistentry>
3369+ </variablelist>
3370+
3371+ <variablelist><title>Computer Opponents</title>
3372+ <varlistentry>
3373+ <term><guimenuitem>Delay between rolls</guimenuitem></term>
3374+ <listitem>
3375+ <para>Make the computer opponents pause between rolls
3376+ of the dice so you can see what they are doing. Slows down
3377+ game play some.
3378+ </para>
3379+ </listitem>
3380+ </varlistentry>
3381+ <varlistentry>
3382+ <term><guimenuitem>Number of opponents</guimenuitem></term>
3383+ <listitem>
3384+ <para>Select the number of computer opponents. You are allowed a
3385+ total of six human and computer players. If you attempt to
3386+ increase this number near the limit, the number of human players
3387+ will be decreased to maintain only six total
3388+ players.
3389+ </para>
3390+ </listitem>
3391+ </varlistentry>
3392+ </variablelist>
3393+
3394+ <variablelist><title>Game Type</title>
3395+ <varlistentry>
3396+ <term><guimenuitem>Version of the game to play</guimenuitem></term>
3397+ <listitem>
3398+ <para>Play either the regular version (similar to Yahtzee) or the
3399+ version with colors (similar to Kismet). When you change game type,
3400+ you must restart the game to see use the new game type.
3401+ </para>
3402+ </listitem>
3403+ </varlistentry>
3404+ </variablelist>
3405+
3406+ <variablelist>
3407+ <varlistentry>
3408+ <term><guimenuitem>Player Names</guimenuitem></term>
3409+ <listitem>
3410+ <para>To change the names of the players just enter new
3411+ names in the boxes.
3412+ </para>
3413+ </listitem>
3414+ </varlistentry>
3415+ </variablelist>
3416+ </sect1>
3417+
3418+ <sect1 id="strategy">
3419+ <title>Game Strategy</title>
3420+ <para>The 63 points needed for the bonus in the upper half
3421+ corresponds to getting three of each die type in each row. If
3422+ you score more than three dice in the fives and sixes rows then
3423+ you can afford to place a bad roll in either the ones row or the
3424+ twos row and still get the bonus.
3425+ In the Colors version, you get a bonus of 55 if your upper half total
3426+ is between 71 and 77, and a bonus of 75 if your upper half total is
3427+ greater than 77.
3428+ </para>
3429+ <para>Don't forget about multiple yahtzees, if you roll a second
3430+ yahtzee you can also put it in the yahtzee row for even more points.
3431+ This only applies to the regular game.
3432+ </para>
3433+ </sect1>
3434+ <!-- ============= Bugs ================================== -->
3435+ <!-- This section should describe known bugs and limitations of
3436+ the program if there are any - please be frank and list all
3437+ problems you know of.
3438+
3439+ Better to leave this section out than to say something unhelpful.
3440+-->
3441+
3442+ <sect1 id="bugs">
3443+ <title>Known Bugs and Limitations</title>
3444+ <para>
3445+ When you switch game type, the game does not use the new dice images
3446+ until you restart gtali. It should play correctly with the "wrong" dice.
3447+ </para>
3448+ </sect1>
3449+
3450+
3451+ <sect1 id="glossary">
3452+ <title>Glossary</title>
3453+ <note>
3454+ <para>Remember that the order of the dice is not important.</para>
3455+ </note>
3456+ <glossary>
3457+ <glossentry id="threeofakind"><glossterm>3 of a Kind</glossterm>
3458+ <glossdef><para>
3459+ Three of the dice have the same number. The score is the
3460+ total of all the dice. e.g. 1, 2, 2, 2, 5.
3461+ </para></glossdef>
3462+ </glossentry>
3463+ <glossentry id="fourofakind"><glossterm>4 of a Kind</glossterm>
3464+ <glossdef><para>
3465+ Four of the dice have the same number. The score is the
3466+ total of all the dice. e.g. 2, 5, 5, 5, 5.
3467+ In the Colors game, the score is 25 plus the total of all the dice.
3468+ </para></glossdef>
3469+ </glossentry>
3470+ <glossentry id="yahtzee"><glossterm>5 of a Kind</glossterm>
3471+ <glossdef><para>
3472+ Five identical dice. e.g. 3, 3, 3, 3, 3.
3473+ In the Colors game, the score is 50 plus the total of all the dice.
3474+ </para></glossdef>
3475+ </glossentry>
3476+ <glossentry id="fullhouse"><glossterm>Full House</glossterm>
3477+ <glossdef><para>
3478+ Five dice consisting of two groups: One group of three with
3479+ the same numbers and another group of two with the same
3480+ numbers. e.g. 1, 1, 1, 4, 4.
3481+ In the Colors game, the score is 15 plus the total of all the dice.
3482+ </para></glossdef>
3483+ </glossentry>
3484+ <glossentry id="fullhousesamecolor"><glossterm>Full House Same Color</glossterm>
3485+ <glossdef><para>
3486+ This category is only used in the Colors game.
3487+ Five dice consisting of two groups: One group of three with
3488+ the same numbers and another group of two with the same
3489+ numbers. The numbers must be all the same color. e.g. 3, 3, 3, 4, 4.
3490+ Two dice are the same color if their numbers total 7: 1 and 6 are black,
3491+ 2 and 5 are red, and 3 and 4 are green.
3492+ The score is 20 plus the total of all the dice.
3493+ </para></glossdef>
3494+ </glossentry>
3495+ <glossentry id="twopairsamecolor"><glossterm>Two Pair Same Color</glossterm>
3496+ <glossdef><para>
3497+ This category is only used in the Colors game.
3498+ Five dice consisting of two groups: One group of two with
3499+ the same numbers and another group of two with the same
3500+ numbers. The pairs must be all the same color. e.g. 3, 3, 4, 4.
3501+ Two dice are the same color if their numbers total 7: 1 and 6 are black,
3502+ 2 and 5 are red, and 3 and 4 are green. The fifth die can be any value.
3503+ The score is the total of all the dice.
3504+ </para></glossdef>
3505+ </glossentry>
3506+ <glossentry id="flush"><glossterm>Flush</glossterm>
3507+ <glossdef><para>
3508+ This category is only used in the Colors game.
3509+ Five dice that are all the same "color":
3510+ Two dice are the same color if their numbers total 7: 1 and 6 are black,
3511+ 2 and 5 are red, and 3 and 4 are green. The fifth die can be any value.
3512+ The score is 35 points.
3513+ </para></glossdef>
3514+ </glossentry>
3515+ <glossentry id="largestraight"><glossterm>Large Straight</glossterm>
3516+ <glossdef><para>
3517+ Five dice with consecutive numbers. e.g. 2, 3, 4, 5, 6.
3518+ The score is 40 points.
3519+ </para></glossdef>
3520+ </glossentry>
3521+ <glossentry id="smallstraight"><glossterm>Small Straight</glossterm>
3522+ <glossdef><para>
3523+ Four dice with consecutive numbers. The fifth die can be
3524+ any number. e.g. 2, 3, 4, 5, 5.
3525+ This category is only used in the regular game.
3526+ The score is 30 points.
3527+ </para></glossdef>
3528+ </glossentry>
3529+ </glossary>
3530+ </sect1>
3531+
3532+
3533+<!-- ============= Authors ================================ -->
3534+
3535+ <sect1 id="authors">
3536+ <title>Authors</title>
3537+ <para>
3538+ <application>GNOME Tali</application> was written by Scott Heavner
3539+ (<email>sdh@po.cwru.edu</email>) and Orest Zborowski.
3540+ This manual was written by Scott D Heavner
3541+ (<email>sdh@po.cwru.edu</email>) with extra material added by
3542+ Callum McKenzie (<email>callum@physics.otago.ac.nz</email>).
3543+ To report a bug or make a suggestion regarding this application or
3544+ this manual, follow the directions in this
3545+ <ulink url="ghelp:user-guide?feedback-bugs" type="help">document</ulink>.
3546+ </para>
3547+
3548+
3549+ <!-- For translations: uncomment this:
3550+
3551+ <para>
3552+ Latin translation was done by ME
3553+ (<email>MYNAME@MYADDRESS</email>). Please send all comments and
3554+ suggestions regarding this translation to SOMEWHERE.
3555+ </para>
3556+
3557+ -->
3558+
3559+ </sect1>
3560+
3561+ <!-- ============= Application License ============================= -->
3562+
3563+ <sect1 id="license">
3564+ <title>License</title>
3565+ <para>
3566+ This program is free software; you can redistribute it and/or
3567+ modify it under the terms of the <ulink type="help" url="gnome-help:gpl">
3568+ <citetitle>GNU General Public License</citetitle></ulink> as
3569+ published by the Free Software Foundation;
3570+ either version 2 of the License, or (at your option) any later
3571+ version.
3572+ </para>
3573+ <para>
3574+ This program is distributed in the hope that it will be useful, but
3575+ WITHOUT ANY WARRANTY; without even the implied warranty of
3576+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3577+ <citetitle>GNU General Public License</citetitle> for more details.
3578+ </para>
3579+ <para>
3580+ A copy of the <citetitle>GNU General Public License</citetitle> is
3581+ included as an appendix to the <citetitle>GNOME Users
3582+ Guide</citetitle>. You may also obtain a copy of the
3583+ <citetitle>GNU General Public License</citetitle> from the Free
3584+ Software Foundation by visiting <ulink type="http"
3585+ url="http://www.fsf.org">their Web site</ulink> or by writing to
3586+ <address>
3587+ Free Software Foundation, Inc.
3588+ <street>59 Temple Place</street> - Suite 330
3589+ <city>Boston</city>, <state>MA</state> <postcode>02111-1307</postcode>
3590+ <country>USA</country>
3591+ </address>
3592+ </para>
3593+ </sect1>
3594+</article>
3595+
3596+
3597+
3598+
3599+
3600+
3601+
3602+
3603+
3604
3605=== added file '.pc/90_fix-help-links.patch/gtali/help/C/index.docbook'
3606=== added file '.pc/90_fix-help-links.patch/gtali/help/Makefile.am'
3607--- .pc/90_fix-help-links.patch/gtali/help/Makefile.am 1970-01-01 00:00:00 +0000
3608+++ .pc/90_fix-help-links.patch/gtali/help/Makefile.am 2012-12-26 19:18:24 +0000
3609@@ -0,0 +1,14 @@
3610+@YELP_HELP_RULES@
3611+HELP_ID = gtali
3612+
3613+HELP_MEDIA = \
3614+ figures/mainwindow.png \
3615+ figures/preferences.png
3616+
3617+HELP_FILES = \
3618+ gtali.xml \
3619+ legal.xml
3620+
3621+HELP_LINGUAS = ca cs da de el en_GB es eu fr gl it oc pt_BR sl sr sr@latin sv zh_CN
3622+
3623+-include $(top_srcdir)/git.mk
3624
3625=== modified file '.pc/applied-patches'
3626--- .pc/applied-patches 2012-04-17 16:31:36 +0000
3627+++ .pc/applied-patches 2012-12-26 19:18:24 +0000
3628@@ -1,3 +1,7 @@
3629 01_lpi.patch
3630 02_desktop-path.patch
3631 03_add-keywords.patch
3632+90_fix-help-links.patch
3633+en_passant_pawns_only.patch
3634+en_passant_remove_victim.patch
3635+cant_castle_after_rook_taken.patch
3636
3637=== added directory '.pc/cant_castle_after_rook_taken.patch'
3638=== added directory '.pc/cant_castle_after_rook_taken.patch/glchess'
3639=== added directory '.pc/cant_castle_after_rook_taken.patch/glchess/src'
3640=== added file '.pc/cant_castle_after_rook_taken.patch/glchess/src/chess-game.vala'
3641--- .pc/cant_castle_after_rook_taken.patch/glchess/src/chess-game.vala 1970-01-01 00:00:00 +0000
3642+++ .pc/cant_castle_after_rook_taken.patch/glchess/src/chess-game.vala 2012-12-26 19:18:24 +0000
3643@@ -0,0 +1,1428 @@
3644+public enum Color
3645+{
3646+ WHITE,
3647+ BLACK
3648+}
3649+
3650+public class ChessPlayer : Object
3651+{
3652+ public Color color;
3653+ public signal void start_turn ();
3654+ public signal bool do_move (string move, bool apply);
3655+ public signal void do_undo ();
3656+ public signal bool do_resign ();
3657+ public signal bool do_claim_draw ();
3658+
3659+ public ChessPlayer (Color color)
3660+ {
3661+ this.color = color;
3662+ }
3663+
3664+ public bool move (string move, bool apply = true)
3665+ {
3666+ return do_move (move, apply);
3667+ }
3668+
3669+ public bool move_with_coords (int r0, int f0, int r1, int f1, bool apply = true)
3670+ {
3671+ string move = "%c%d%c%d".printf ('a' + f0, r0 + 1, 'a' + f1, r1 + 1);
3672+ return do_move (move, apply);
3673+ }
3674+
3675+ public void undo ()
3676+ {
3677+ do_undo ();
3678+ }
3679+
3680+ public bool resign ()
3681+ {
3682+ return do_resign ();
3683+ }
3684+
3685+ public bool claim_draw ()
3686+ {
3687+ return do_claim_draw ();
3688+ }
3689+}
3690+
3691+public enum PieceType
3692+{
3693+ PAWN,
3694+ ROOK,
3695+ KNIGHT,
3696+ BISHOP,
3697+ QUEEN,
3698+ KING
3699+}
3700+
3701+public class ChessPiece
3702+{
3703+ public ChessPlayer player;
3704+ public PieceType type;
3705+
3706+ public signal void moved ();
3707+ public signal void promoted ();
3708+ public signal void died ();
3709+
3710+ public Color color
3711+ {
3712+ get { return player.color; }
3713+ }
3714+
3715+ public unichar symbol
3716+ {
3717+ get
3718+ {
3719+ unichar c = ' ';
3720+ switch (type)
3721+ {
3722+ case PieceType.PAWN:
3723+ c = 'p';
3724+ break;
3725+ case PieceType.ROOK:
3726+ c = 'r';
3727+ break;
3728+ case PieceType.KNIGHT:
3729+ c = 'k';
3730+ break;
3731+ case PieceType.BISHOP:
3732+ c = 'b';
3733+ break;
3734+ case PieceType.QUEEN:
3735+ c = 'q';
3736+ break;
3737+ case PieceType.KING:
3738+ c = 'k';
3739+ break;
3740+ }
3741+ if (player.color == Color.WHITE)
3742+ c = c.toupper ();
3743+ return c;
3744+ }
3745+ }
3746+
3747+ public ChessPiece (ChessPlayer player, PieceType type)
3748+ {
3749+ this.player = player;
3750+ this.type = type;
3751+ }
3752+}
3753+
3754+public enum CheckState
3755+{
3756+ NONE,
3757+ CHECK,
3758+ CHECKMATE
3759+}
3760+
3761+public class ChessMove
3762+{
3763+ public int number;
3764+ public ChessPiece piece;
3765+ public ChessPiece? promotion_piece;
3766+ public ChessPiece? moved_rook;
3767+ public ChessPiece? victim;
3768+ public int r0;
3769+ public int f0;
3770+ public int r1;
3771+ public int f1;
3772+ public bool ambiguous_rank;
3773+ public bool ambiguous_file;
3774+ public CheckState check_state;
3775+
3776+ public string get_lan ()
3777+ {
3778+ if (moved_rook != null)
3779+ {
3780+ if (f1 > f0)
3781+ return "O-O";
3782+ else
3783+ return "O-O-O";
3784+ }
3785+
3786+ var builder = new StringBuilder ();
3787+ if (victim != null)
3788+ builder.append_printf ("%c%dx%c%d", 'a' + f0, r0 + 1, 'a' + f1, r1 + 1);
3789+ else
3790+ builder.append_printf ("%c%d-%c%d", 'a' + f0, r0 + 1, 'a' + f1, r1 + 1);
3791+
3792+ const char promotion_symbols[] = {' ', 'R', 'N', 'B', 'Q', 'K'};
3793+ if (promotion_piece != null)
3794+ builder.append_printf ("=%c", promotion_symbols[promotion_piece.type]);
3795+
3796+ switch (check_state)
3797+ {
3798+ case CheckState.CHECK:
3799+ builder.append_c ('+');
3800+ break;
3801+ case CheckState.CHECKMATE:
3802+ builder.append_c ('#');
3803+ break;
3804+ }
3805+
3806+ return builder.str;
3807+ }
3808+
3809+ public string get_san ()
3810+ {
3811+ const string piece_names[] = {"", "R", "N", "B", "Q", "K"};
3812+ return make_san ((string[]) piece_names);
3813+ }
3814+
3815+ public string get_fan ()
3816+ {
3817+ const string white_piece_names[] = {"", "♞", "♝", "♜", "♛", "♚"};
3818+ const string black_piece_names[] = {"", "♘", "♗", "♖", "♕", "♔"};
3819+ if (piece.color == Color.WHITE)
3820+ return make_san ((string[]) white_piece_names);
3821+ else
3822+ return make_san ((string[]) black_piece_names);
3823+ }
3824+
3825+ private string make_san (string[] piece_names)
3826+ {
3827+ if (moved_rook != null)
3828+ {
3829+ if (f1 > f0)
3830+ return "O-O";
3831+ else
3832+ return "O-O-O";
3833+ }
3834+
3835+ var builder = new StringBuilder ();
3836+ builder.append (piece_names[piece.type]);
3837+ if (ambiguous_file)
3838+ builder.append_printf ("%c", 'a' + f0);
3839+ if (ambiguous_rank)
3840+ builder.append_printf ("%d", r0 + 1);
3841+ if (victim != null)
3842+ builder.append ("x");
3843+ builder.append_printf ("%c%d", 'a' + f1, r1 + 1);
3844+
3845+ if (promotion_piece != null)
3846+ builder.append_printf ("=%s", piece_names[promotion_piece.type]);
3847+
3848+ switch (check_state)
3849+ {
3850+ case CheckState.CHECK:
3851+ builder.append_c ('+');
3852+ break;
3853+ case CheckState.CHECKMATE:
3854+ builder.append_c ('#');
3855+ break;
3856+ }
3857+
3858+ return builder.str;
3859+ }
3860+
3861+ /* Move suitable for a chess engine (CECP/UCI) */
3862+ public string get_engine ()
3863+ {
3864+ var builder = new StringBuilder ();
3865+ const char promotion_symbols[] = {' ', 'r', 'n', 'b', 'q', ' '};
3866+ if (promotion_piece != null)
3867+ builder.append_printf ("%c%d%c%d%c", 'a' + f0, r0 + 1, 'a' + f1, r1 + 1, promotion_symbols[promotion_piece.type]);
3868+ else
3869+ builder.append_printf ("%c%d%c%d", 'a' + f0, r0 + 1, 'a' + f1, r1 + 1);
3870+ return builder.str;
3871+ }
3872+
3873+ public ChessMove copy ()
3874+ {
3875+ var move = new ChessMove ();
3876+ move.number = number;
3877+ move.piece = piece;
3878+ move.promotion_piece = promotion_piece;
3879+ move.moved_rook = moved_rook;
3880+ move.victim = victim;
3881+ move.r0 = r0;
3882+ move.f0 = f0;
3883+ move.r1 = r1;
3884+ move.f1 = f1;
3885+ move.ambiguous_rank = ambiguous_rank;
3886+ move.ambiguous_file = ambiguous_file;
3887+ move.check_state = check_state;
3888+ return move;
3889+ }
3890+}
3891+
3892+public class ChessState
3893+{
3894+ public int number = 0;
3895+ public ChessPlayer players[2];
3896+ public ChessPlayer current_player;
3897+ public ChessPlayer opponent
3898+ {
3899+ get { return current_player.color == Color.WHITE ? players[Color.BLACK] : players[Color.WHITE]; }
3900+ }
3901+ public bool can_castle_kingside[2];
3902+ public bool can_castle_queenside[2];
3903+ public int en_passant_index = -1;
3904+ public CheckState check_state;
3905+ public int halfmove_clock;
3906+
3907+ public ChessPiece board[64];
3908+ public ChessMove? last_move = null;
3909+
3910+ /* Bitmap of all the pieces */
3911+ private int64 piece_masks[2];
3912+
3913+ private ChessState.empty ()
3914+ {
3915+ }
3916+
3917+ public ChessState (string fen)
3918+ {
3919+ players[Color.WHITE] = new ChessPlayer (Color.WHITE);
3920+ players[Color.BLACK] = new ChessPlayer (Color.BLACK);
3921+ for (int i = 0; i < 64; i++)
3922+ board[i] = null;
3923+
3924+ string[] fields = fen.split (" ");
3925+ //if (fields.length != 6)
3926+ // throw new Error ("Invalid FEN string");
3927+
3928+ /* Field 1: Piece placement */
3929+ string[] ranks = fields[0].split ("/");
3930+ //if (ranks.length != 8)
3931+ // throw new Error ("Invalid piece placement");
3932+ for (int rank = 0; rank < 8; rank++)
3933+ {
3934+ var rank_string = ranks[7 - rank];
3935+ for (int file = 0, offset = 0; file < 8 && offset < rank_string.length; offset++)
3936+ {
3937+ var c = rank_string[offset];
3938+ if (c >= '1' && c <= '8')
3939+ {
3940+ file += c - '0';
3941+ continue;
3942+ }
3943+
3944+ PieceType type;
3945+ var color = c.isupper () ? Color.WHITE : Color.BLACK;
3946+ if (!decode_piece_type (c.toupper (), out type))
3947+ ;//throw new Error ("");
3948+
3949+ int index = get_index (rank, file);
3950+ ChessPiece piece = new ChessPiece (players[color], type);
3951+ board[index] = piece;
3952+ int64 mask = BitBoard.set_location_masks[index];
3953+ piece_masks[color] |= mask;
3954+ file++;
3955+ }
3956+ }
3957+
3958+ /* Field 2: Active color */
3959+ if (fields[1] == "w")
3960+ current_player = players[Color.WHITE];
3961+ else if (fields[1] == "b")
3962+ current_player = players[Color.BLACK];
3963+ //else
3964+ // throw new Error ("Unknown active color: %s", fields[1]);
3965+
3966+ /* Field 3: Castling availability */
3967+ if (fields[2] != "-")
3968+ {
3969+ for (int i = 0; i < fields[2].length; i++)
3970+ {
3971+ var c = fields[2][i];
3972+ if (c == 'K')
3973+ can_castle_kingside[Color.WHITE] = true;
3974+ else if (c == 'Q')
3975+ can_castle_queenside[Color.WHITE] = true;
3976+ else if (c == 'k')
3977+ can_castle_kingside[Color.BLACK] = true;
3978+ else if (c == 'q')
3979+ can_castle_queenside[Color.BLACK] = true;
3980+ //else
3981+ // throw new Error ("");
3982+ }
3983+ }
3984+
3985+ /* Field 4: En passant target square */
3986+ if (fields[3] != "-")
3987+ {
3988+ //if (fields[3].length != 2)
3989+ // throw new Error ("");
3990+ en_passant_index = get_index (fields[3][1] - '1', fields[3][0] - 'a');
3991+ }
3992+
3993+ /* Field 5: Halfmove clock */
3994+ halfmove_clock = int.parse (fields[4]);
3995+
3996+ /* Field 6: Fullmove number */
3997+ number = (int.parse (fields[5]) - 1) * 2;
3998+ if (current_player.color == Color.BLACK)
3999+ number++;
4000+
4001+ check_state = get_check_state (current_player);
4002+ }
4003+
4004+ public ChessState copy ()
4005+ {
4006+ ChessState state = new ChessState.empty ();
4007+
4008+ state.number = number;
4009+ state.players[Color.WHITE] = players[Color.WHITE];
4010+ state.players[Color.BLACK] = players[Color.BLACK];
4011+ state.current_player = current_player;
4012+ state.can_castle_kingside[Color.WHITE] = can_castle_kingside[Color.WHITE];
4013+ state.can_castle_queenside[Color.WHITE] = can_castle_queenside[Color.WHITE];
4014+ state.can_castle_kingside[Color.BLACK] = can_castle_kingside[Color.BLACK];
4015+ state.can_castle_queenside[Color.BLACK] = can_castle_queenside[Color.BLACK];
4016+ state.en_passant_index = en_passant_index;
4017+ state.check_state = check_state;
4018+ if (last_move != null)
4019+ state.last_move = last_move.copy();
4020+ for (int i = 0; i < 64; i++)
4021+ state.board[i] = board[i];
4022+ state.piece_masks[Color.WHITE] = piece_masks[Color.WHITE];
4023+ state.piece_masks[Color.BLACK] = piece_masks[Color.BLACK];
4024+
4025+ return state;
4026+ }
4027+
4028+ public bool equals (ChessState state)
4029+ {
4030+ /* Check first if there is the same layout of pieces (unlikely),
4031+ * then the move castling and en-passant state are the same,
4032+ * then finally that it is the same move */
4033+ if (piece_masks[Color.WHITE] != state.piece_masks[Color.WHITE] ||
4034+ piece_masks[Color.BLACK] != state.piece_masks[Color.BLACK] ||
4035+ can_castle_kingside[Color.WHITE] != state.can_castle_kingside[Color.WHITE] ||
4036+ can_castle_queenside[Color.WHITE] != state.can_castle_queenside[Color.WHITE] ||
4037+ can_castle_kingside[Color.BLACK] != state.can_castle_kingside[Color.BLACK] ||
4038+ can_castle_queenside[Color.BLACK] != state.can_castle_queenside[Color.BLACK] ||
4039+ en_passant_index != state.en_passant_index ||
4040+ (last_move != null) != (state.last_move != null) ||
4041+ last_move.piece.type != state.last_move.piece.type ||
4042+ last_move.r0 != state.last_move.r0 ||
4043+ last_move.f0 != state.last_move.f0 ||
4044+ last_move.r1 != state.last_move.r1 ||
4045+ last_move.f1 != state.last_move.f1)
4046+ return false;
4047+
4048+ /* Finally check the same piece types are present */
4049+ for (int i = 0; i < 64; i++)
4050+ {
4051+ if (board[i] != null && board[i].type != state.board[i].type)
4052+ return false;
4053+ }
4054+
4055+ return true;
4056+ }
4057+
4058+ public string get_fen ()
4059+ {
4060+ var value = new StringBuilder ();
4061+
4062+ for (int rank = 7; rank >= 0; rank--)
4063+ {
4064+ int skip_count = 0;
4065+ for (int file = 0; file < 8; file++)
4066+ {
4067+ var p = board[get_index (rank, file)];
4068+ if (p == null)
4069+ skip_count++;
4070+ else
4071+ {
4072+ if (skip_count > 0)
4073+ {
4074+ value.append_printf ("%d", skip_count);
4075+ skip_count = 0;
4076+ }
4077+ value.append_printf ("%c", (int) p.symbol);
4078+ }
4079+ }
4080+ if (skip_count > 0)
4081+ value.append_printf ("%d", skip_count);
4082+ if (rank != 0)
4083+ value.append_c ('/');
4084+ }
4085+
4086+ value.append_c (' ');
4087+ if (current_player.color == Color.WHITE)
4088+ value.append_c ('w');
4089+ else
4090+ value.append_c ('b');
4091+
4092+ value.append_c (' ');
4093+ if (can_castle_kingside[Color.WHITE])
4094+ value.append_c ('K');
4095+ if (can_castle_queenside[Color.WHITE])
4096+ value.append_c ('Q');
4097+ if (can_castle_kingside[Color.BLACK])
4098+ value.append_c ('k');
4099+ if (can_castle_queenside[Color.BLACK])
4100+ value.append_c ('q');
4101+ if (!(can_castle_kingside[Color.WHITE] | can_castle_queenside[Color.WHITE] | can_castle_kingside[Color.BLACK] | can_castle_queenside[Color.BLACK]))
4102+ value.append_c ('-');
4103+
4104+ value.append_c (' ');
4105+ if (en_passant_index >= 0)
4106+ value.append_printf ("%c%d", 'a' + get_file (en_passant_index), get_rank (en_passant_index) + 1);
4107+ else
4108+ value.append_c ('-');
4109+
4110+ value.append_c (' ');
4111+ value.append_printf ("%d", halfmove_clock);
4112+
4113+ value.append_c (' ');
4114+ if (current_player.color == Color.WHITE)
4115+ value.append_printf ("%d", number / 2);
4116+ else
4117+ value.append_printf ("%d", number / 2 + 1);
4118+
4119+ return value.str;
4120+ }
4121+
4122+ public int get_index (int rank, int file)
4123+ {
4124+ return rank * 8 + file;
4125+ }
4126+
4127+ public int get_rank (int index)
4128+ {
4129+ return index / 8;
4130+ }
4131+
4132+ public int get_file (int index)
4133+ {
4134+ return index % 8;
4135+ }
4136+
4137+ public bool move (string move, bool apply = true)
4138+ {
4139+ int r0, f0, r1, f1;
4140+ PieceType promotion_type;
4141+
4142+ if (!decode_move (current_player, move, out r0, out f0, out r1, out f1, out promotion_type))
4143+ return false;
4144+
4145+ if (!move_with_coords (current_player, r0, f0, r1, f1, promotion_type, apply))
4146+ return false;
4147+
4148+ return true;
4149+ }
4150+
4151+ public bool move_with_coords (ChessPlayer player,
4152+ int r0, int f0, int r1, int f1,
4153+ PieceType promotion_type = PieceType.QUEEN,
4154+ bool apply = true, bool test_check = true)
4155+ {
4156+ // FIXME: Make this use indexes to be faster
4157+ var start = get_index (r0, f0);
4158+ var end = get_index (r1, f1);
4159+
4160+ var color = player.color;
4161+ var opponent_color = color == Color.WHITE ? Color.BLACK : Color.WHITE;
4162+
4163+ /* Must be moving own piece */
4164+ var piece = board[start];
4165+ if (piece == null || piece.player != player)
4166+ return false;
4167+
4168+ /* Check valid move */
4169+ int64 end_mask = BitBoard.set_location_masks[end];
4170+ int64 move_mask = BitBoard.move_masks[color * 64*6 + piece.type * 64 + start];
4171+ if ((end_mask & move_mask) == 0)
4172+ return false;
4173+
4174+ /* Check no pieces in the way */
4175+ int64 over_mask = BitBoard.over_masks[start * 64 + end];
4176+ if ((over_mask & (piece_masks[Color.WHITE] | piece_masks[Color.BLACK])) != 0)
4177+ return false;
4178+
4179+ /* Get victim of move */
4180+ var victim = board[end];
4181+ var victim_index = end;
4182+
4183+ /* Can't take own pieces */
4184+ if (victim != null && victim.player == player)
4185+ return false;
4186+
4187+ /* Check special moves */
4188+ int rook_start = -1, rook_end = -1;
4189+ bool is_promotion = false;
4190+ bool ambiguous_rank = false;
4191+ bool ambiguous_file = false;
4192+ switch (piece.type)
4193+ {
4194+ case PieceType.PAWN:
4195+ /* Check if taking an marched pawn */
4196+ if (victim == null && end == en_passant_index)
4197+ {
4198+ victim_index = get_index (r1 == 2 ? 3 : 4, f1);
4199+ victim = board[victim_index];
4200+ }
4201+
4202+ /* If moving diagonally there must be a victim */
4203+ if (f0 != f1)
4204+ {
4205+ if (victim == null)
4206+ return false;
4207+ }
4208+ else
4209+ {
4210+ /* If moving forward can't take enemy */
4211+ if (victim != null)
4212+ return false;
4213+ }
4214+ is_promotion = r1 == 0 || r1 == 7;
4215+
4216+ /* Always show the file of a pawn capturing */
4217+ if (victim != null)
4218+ ambiguous_file = true;
4219+ break;
4220+ case PieceType.KING:
4221+ /* If moving more than one square must be castling */
4222+ if ((f0 - f1).abs () > 1)
4223+ {
4224+ /* File the rook is on */
4225+ rook_start = get_index (r0, f1 > f0 ? 7 : 0);
4226+ rook_end = get_index (r0, f1 > f0 ? f1 - 1 : f1 + 1);
4227+
4228+ /* Check if can castle */
4229+ if (f1 > f0)
4230+ {
4231+ if (!can_castle_kingside[color])
4232+ return false;
4233+ }
4234+ else
4235+ {
4236+ if (!can_castle_queenside[color])
4237+ return false;
4238+ }
4239+
4240+ var rook = board[rook_start];
4241+ if (rook == null)
4242+ return false;
4243+
4244+ /* Check rook can move */
4245+ int64 rook_over_mask = BitBoard.over_masks[rook_start * 64 + rook_end];
4246+ if ((rook_over_mask & (piece_masks[Color.WHITE] | piece_masks[Color.BLACK])) != 0)
4247+ return false;
4248+
4249+ /* Can't castle when in check */
4250+ if (check_state == CheckState.CHECK)
4251+ return false;
4252+
4253+ /* Square moved across can't be under attack */
4254+ for (int i = 0; i < 64; i++)
4255+ {
4256+ if (move_with_coords (opponent, get_rank (i), get_file (i), get_rank (rook_end), get_file (rook_end), PieceType.QUEEN, false, false))
4257+ return false;
4258+ }
4259+ }
4260+ break;
4261+ default:
4262+ break;
4263+ }
4264+
4265+ if (!apply && !test_check)
4266+ return true;
4267+
4268+ /* Check if other pieces of the same type can make this move - this is required for SAN notation */
4269+ if (apply)
4270+ {
4271+ for (int i = 0; i < 64; i++)
4272+ {
4273+ /* Ignore our move */
4274+ if (i == start)
4275+ continue;
4276+
4277+ /* Check for a friendly piece of the same type */
4278+ var p = board[i];
4279+ if (p == null || p.player != player || p.type != piece.type)
4280+ continue;
4281+
4282+ /* If more than one piece can move then the rank and/or file are ambiguous */
4283+ var r = get_rank (i);
4284+ var f = get_file (i);
4285+ if (move_with_coords (player, r, f, r1, f1, PieceType.QUEEN, false))
4286+ {
4287+ if (r != r0)
4288+ ambiguous_rank = true;
4289+ if (f != f0)
4290+ ambiguous_file = true;
4291+ }
4292+ }
4293+ }
4294+
4295+ var old_white_mask = piece_masks[Color.WHITE];
4296+ var old_black_mask = piece_masks[Color.BLACK];
4297+ var old_white_can_castle_kingside = can_castle_kingside[Color.WHITE];
4298+ var old_white_can_castle_queenside = can_castle_queenside[Color.WHITE];
4299+ var old_black_can_castle_kingside = can_castle_kingside[Color.BLACK];
4300+ var old_black_can_castle_queenside = can_castle_queenside[Color.BLACK];
4301+ var old_en_passant_index = en_passant_index;
4302+ var old_halfmove_clock = halfmove_clock;
4303+
4304+ /* Update board */
4305+ board[start] = null;
4306+ piece_masks[Color.WHITE] &= BitBoard.clear_location_masks[start];
4307+ piece_masks[Color.BLACK] &= BitBoard.clear_location_masks[start];
4308+ if (victim != null)
4309+ {
4310+ board[victim_index] = null;
4311+ piece_masks[Color.WHITE] &= BitBoard.clear_location_masks[victim_index];
4312+ piece_masks[Color.BLACK] &= BitBoard.clear_location_masks[victim_index];
4313+ }
4314+ if (is_promotion)
4315+ board[end] = new ChessPiece (player, promotion_type);
4316+ else
4317+ board[end] = piece;
4318+ piece_masks[color] |= end_mask;
4319+ piece_masks[opponent_color] &= BitBoard.clear_location_masks[end];
4320+ if (rook_start >= 0)
4321+ {
4322+ var rook = board[rook_start];
4323+ board[rook_start] = null;
4324+ piece_masks[color] &= BitBoard.clear_location_masks[rook_start];
4325+ board[rook_end] = rook;
4326+ piece_masks[color] |= BitBoard.set_location_masks[rook_end];
4327+ }
4328+
4329+ /* Can't castle once king has moved */
4330+ if (piece.type == PieceType.KING)
4331+ {
4332+ can_castle_kingside[color] = false;
4333+ can_castle_queenside[color] = false;
4334+ }
4335+ /* Can't castle once rooks have moved */
4336+ else if (piece.type == PieceType.ROOK)
4337+ {
4338+ int base_rank = color == Color.WHITE ? 0 : 7;
4339+ if (r0 == base_rank)
4340+ {
4341+ if (f0 == 0)
4342+ can_castle_queenside[color] = false;
4343+ else if (f0 == 7)
4344+ can_castle_kingside[color] = false;
4345+ }
4346+ }
4347+
4348+ /* Pawn square moved over is vulnerable */
4349+ if (piece.type == PieceType.PAWN && over_mask != 0)
4350+ en_passant_index = get_index ((r0 + r1) / 2, f0);
4351+ else
4352+ en_passant_index = -1;
4353+
4354+ /* Reset halfmove count when pawn moved or piece taken */
4355+ if (piece.type == PieceType.PAWN || victim != null)
4356+ halfmove_clock = 0;
4357+ else
4358+ halfmove_clock++;
4359+
4360+ /* Test if this move would leave that player in check */
4361+ bool result = true;
4362+ if (test_check && is_in_check (player))
4363+ result = false;
4364+
4365+ /* Undo move */
4366+ if (!apply || !result)
4367+ {
4368+ board[start] = piece;
4369+ board[end] = null;
4370+ if (victim != null)
4371+ board[victim_index] = victim;
4372+ if (rook_start >= 0)
4373+ {
4374+ var rook = board[rook_end];
4375+ board[rook_start] = rook;
4376+ board[rook_end] = null;
4377+ }
4378+ piece_masks[Color.WHITE] = old_white_mask;
4379+ piece_masks[Color.BLACK] = old_black_mask;
4380+ can_castle_kingside[Color.WHITE] = old_white_can_castle_kingside;
4381+ can_castle_queenside[Color.WHITE] = old_white_can_castle_queenside;
4382+ can_castle_kingside[Color.BLACK] = old_black_can_castle_kingside;
4383+ can_castle_queenside[Color.BLACK] = old_black_can_castle_queenside;
4384+ en_passant_index = old_en_passant_index;
4385+ halfmove_clock = old_halfmove_clock;
4386+
4387+ return result;
4388+ }
4389+
4390+ current_player = color == Color.WHITE ? players[Color.BLACK] : players[Color.WHITE];
4391+ check_state = get_check_state (current_player);
4392+
4393+ last_move = new ChessMove ();
4394+ last_move.number = number;
4395+ last_move.piece = piece;
4396+ if (is_promotion)
4397+ last_move.promotion_piece = board[end];
4398+ last_move.victim = victim;
4399+ if (rook_end >= 0)
4400+ last_move.moved_rook = board[rook_end];
4401+ last_move.r0 = r0;
4402+ last_move.f0 = f0;
4403+ last_move.r1 = r1;
4404+ last_move.f1 = f1;
4405+ last_move.ambiguous_rank = ambiguous_rank;
4406+ last_move.ambiguous_file = ambiguous_file;
4407+ last_move.check_state = check_state;
4408+
4409+ return true;
4410+ }
4411+
4412+ public ChessResult get_result (out ChessRule rule)
4413+ {
4414+ rule = ChessRule.CHECKMATE;
4415+ if (check_state == CheckState.CHECKMATE)
4416+ {
4417+ if (current_player.color == Color.WHITE)
4418+ {
4419+ rule = ChessRule.CHECKMATE;
4420+ return ChessResult.BLACK_WON;
4421+ }
4422+ else
4423+ {
4424+ rule = ChessRule.CHECKMATE;
4425+ return ChessResult.WHITE_WON;
4426+ }
4427+ }
4428+
4429+ if (!can_move (current_player))
4430+ {
4431+ rule = ChessRule.STALEMATE;
4432+ return ChessResult.DRAW;
4433+ }
4434+
4435+ if (last_move != null && last_move.victim != null && !have_sufficient_material ())
4436+ {
4437+ rule = ChessRule.INSUFFICIENT_MATERIAL;
4438+ return ChessResult.DRAW;
4439+ }
4440+
4441+ return ChessResult.IN_PROGRESS;
4442+ }
4443+
4444+ private CheckState get_check_state (ChessPlayer player)
4445+ {
4446+ if (is_in_check (player))
4447+ {
4448+ if (is_in_checkmate (player))
4449+ return CheckState.CHECKMATE;
4450+ else
4451+ return CheckState.CHECK;
4452+ }
4453+ return CheckState.NONE;
4454+ }
4455+
4456+ private bool is_in_check (ChessPlayer player)
4457+ {
4458+ var opponent = player.color == Color.WHITE ? players[Color.BLACK] : players[Color.WHITE];
4459+
4460+ /* Is in check if any piece can take the king */
4461+ for (int king_index = 0; king_index < 64; king_index++)
4462+ {
4463+ var p = board[king_index];
4464+ if (p != null && p.player == player && p.type == PieceType.KING)
4465+ {
4466+ /* See if any enemy pieces can take the king */
4467+ for (int start = 0; start < 64; start++)
4468+ {
4469+ if (move_with_coords (opponent,
4470+ get_rank (start), get_file (start),
4471+ get_rank (king_index), get_file (king_index),
4472+ PieceType.QUEEN, false, false))
4473+ return true;
4474+ }
4475+ }
4476+ }
4477+
4478+ return false;
4479+ }
4480+
4481+ private bool is_in_checkmate (ChessPlayer player)
4482+ {
4483+ /* Is in checkmate if no pieces can move */
4484+ for (int piece_index = 0; piece_index < 64; piece_index++)
4485+ {
4486+ var p = board[piece_index];
4487+ if (p != null && p.player == player)
4488+ {
4489+ for (int end = 0; end < 64; end++)
4490+ {
4491+ if (move_with_coords (player,
4492+ get_rank (piece_index), get_file (piece_index),
4493+ get_rank (end), get_file (end),
4494+ PieceType.QUEEN, false, true))
4495+ return false;
4496+ }
4497+ }
4498+ }
4499+
4500+ return true;
4501+ }
4502+
4503+ private bool can_move (ChessPlayer player)
4504+ {
4505+ bool have_pieces = false;
4506+
4507+ for (int start = 0; start < 64; start++)
4508+ {
4509+ var p = board[start];
4510+ if (p != null && p.player == player)
4511+ {
4512+ have_pieces = true;
4513+
4514+ /* See if can move anywhere */
4515+ for (int end = 0; end < 64; end++)
4516+ {
4517+ if (move_with_coords (player,
4518+ get_rank (start), get_file (start),
4519+ get_rank (end), get_file (end),
4520+ PieceType.QUEEN, false, true))
4521+ return true;
4522+ }
4523+ }
4524+ }
4525+
4526+ /* Only mark as stalemate if have at least one piece */
4527+ if (have_pieces)
4528+ return false;
4529+ else
4530+ return true;
4531+ }
4532+
4533+ public bool have_sufficient_material ()
4534+ {
4535+ var white_knight_count = 0;
4536+ var white_bishop_count = 0;
4537+ var white_bishop_on_white_square = false;
4538+ var white_bishop_on_black_square = false;
4539+ var black_knight_count = 0;
4540+ var black_bishop_count = 0;
4541+ var black_bishop_on_white_square = false;
4542+ var black_bishop_on_black_square = false;
4543+
4544+ for (int i = 0; i < 64; i++)
4545+ {
4546+ var p = board[i];
4547+ if (p == null)
4548+ continue;
4549+
4550+ /* Any pawns, rooks or queens can perform checkmate */
4551+ if (p.type == PieceType.PAWN || p.type == PieceType.ROOK || p.type == PieceType.QUEEN)
4552+ return true;
4553+
4554+ /* Otherwise, count the minor pieces for each colour... */
4555+ if (p.type == PieceType.KNIGHT)
4556+ {
4557+ if (p.color == Color.WHITE)
4558+ white_knight_count++;
4559+ else
4560+ black_knight_count++;
4561+ }
4562+
4563+ if (p.type == PieceType.BISHOP)
4564+ {
4565+ var color = Color.BLACK;
4566+ if ((i + i/8) % 2 != 0)
4567+ color = Color.WHITE;
4568+
4569+ if (p.color == Color.WHITE)
4570+ {
4571+ if (color == Color.WHITE)
4572+ white_bishop_on_white_square = true;
4573+ else
4574+ white_bishop_on_black_square = true;
4575+ white_bishop_count++;
4576+ }
4577+ else
4578+ {
4579+ if (color == Color.WHITE)
4580+ black_bishop_on_white_square = true;
4581+ else
4582+ black_bishop_on_black_square = true;
4583+ black_bishop_count++;
4584+ }
4585+ }
4586+
4587+ /* Three knights versus king can checkmate */
4588+ if (white_knight_count > 2 || black_knight_count > 2)
4589+ return true;
4590+
4591+ /* Bishop and knight versus king can checkmate */
4592+ if (white_bishop_count > 0 && white_knight_count > 0)
4593+ return true;
4594+ if (black_bishop_count > 0 && black_knight_count > 0)
4595+ return true;
4596+
4597+ /* King and bishops versus king can checkmate as long as the bishops are on both colours */
4598+ if (white_bishop_on_white_square && white_bishop_on_black_square)
4599+ return true;
4600+ if (black_bishop_on_white_square && black_bishop_on_black_square)
4601+ return true;
4602+ }
4603+
4604+ return false;
4605+ }
4606+
4607+ private bool decode_piece_type (unichar c, out PieceType type)
4608+ {
4609+ type = PieceType.PAWN;
4610+ switch (c)
4611+ {
4612+ case 'P':
4613+ type = PieceType.PAWN;
4614+ return true;
4615+ case 'R':
4616+ type = PieceType.ROOK;
4617+ return true;
4618+ case 'N':
4619+ type = PieceType.KNIGHT;
4620+ return true;
4621+ case 'B':
4622+ type = PieceType.BISHOP;
4623+ return true;
4624+ case 'Q':
4625+ type = PieceType.QUEEN;
4626+ return true;
4627+ case 'K':
4628+ type = PieceType.KING;
4629+ return true;
4630+ default:
4631+ return false;
4632+ }
4633+ }
4634+
4635+ private bool decode_move (ChessPlayer player, string move, out int r0, out int f0, out int r1, out int f1, out PieceType promotion_type)
4636+ {
4637+ int i = 0;
4638+
4639+ promotion_type = PieceType.QUEEN;
4640+ if (move.has_prefix ("O-O-O"))
4641+ {
4642+ if (player.color == Color.WHITE)
4643+ r0 = r1 = 0;
4644+ else
4645+ r0 = r1 = 7;
4646+ f0 = 4;
4647+ f1 = 2;
4648+ i += (int) "O-O-O".length;
4649+ }
4650+ else if (move.has_prefix ("O-O"))
4651+ {
4652+ if (player.color == Color.WHITE)
4653+ r0 = r1 = 0;
4654+ else
4655+ r0 = r1 = 7;
4656+ f0 = 4;
4657+ f1 = 6;
4658+ i += (int) "O-O".length;
4659+ }
4660+ else
4661+ {
4662+ PieceType type = PieceType.PAWN;
4663+ if (decode_piece_type (move[i], out type))
4664+ i++;
4665+
4666+ r0 = f0 = r1 = f1 = -1;
4667+ if (move[i] >= 'a' && move[i] <= 'h')
4668+ {
4669+ f1 = (int) (move[i] - 'a');
4670+ i++;
4671+ }
4672+ if (move[i] >= '1' && move[i] <= '8')
4673+ {
4674+ r1 = (int) (move[i] - '1');
4675+ i++;
4676+ }
4677+ if (move[i] == 'x')
4678+ i++;
4679+ if (move[i] >= 'a' && move[i] <= 'h')
4680+ {
4681+ f0 = f1;
4682+ f1 = (int) (move[i] - 'a');
4683+ i++;
4684+ }
4685+ if (move[i] >= '1' && move[i] <= '8')
4686+ {
4687+ r0 = r1;
4688+ r1 = (int) (move[i] - '1');
4689+ i++;
4690+ }
4691+ if (move[i] == '=')
4692+ {
4693+ i++;
4694+ if (decode_piece_type (move[i], out promotion_type))
4695+ i++;
4696+ }
4697+ else if (move[i] != '\0')
4698+ {
4699+ switch (move[i])
4700+ {
4701+ case 'q':
4702+ promotion_type = PieceType.QUEEN;
4703+ i++;
4704+ break;
4705+ case 'n':
4706+ promotion_type = PieceType.KNIGHT;
4707+ i++;
4708+ break;
4709+ case 'r':
4710+ promotion_type = PieceType.ROOK;
4711+ i++;
4712+ break;
4713+ case 'b':
4714+ promotion_type = PieceType.BISHOP;
4715+ i++;
4716+ break;
4717+ }
4718+ }
4719+
4720+ /* Don't have a destination to move to */
4721+ if (r1 < 0 || f1 < 0)
4722+ {
4723+ debug ("Move %s missing destination", move);
4724+ return false;
4725+ }
4726+
4727+ /* Find source piece */
4728+ if (r0 < 0 || f0 < 0)
4729+ {
4730+ int match_rank = -1, match_file = -1;
4731+
4732+ for (int file = 0; file < 8; file++)
4733+ {
4734+ if (f0 >= 0 && file != f0)
4735+ continue;
4736+
4737+ for (int rank = 0; rank < 8; rank++)
4738+ {
4739+ if (r0 >= 0 && rank != r0)
4740+ continue;
4741+
4742+ /* Only check this players pieces of the correct type */
4743+ var piece = board[get_index (rank, file)];
4744+ if (piece == null || piece.type != type || piece.player != player)
4745+ continue;
4746+
4747+ /* See if can move here */
4748+ if (!this.move_with_coords (player, rank, file, r1, f1, PieceType.QUEEN, false))
4749+ continue;
4750+
4751+ /* Duplicate match */
4752+ if (match_rank >= 0)
4753+ {
4754+ debug ("Move %s is ambiguous", move);
4755+ return false;
4756+ }
4757+
4758+ match_rank = rank;
4759+ match_file = file;
4760+ }
4761+ }
4762+
4763+ if (match_rank < 0)
4764+ {
4765+ debug ("Move %s has no matches", move);
4766+ return false;
4767+ }
4768+
4769+ r0 = match_rank;
4770+ f0 = match_file;
4771+ }
4772+ }
4773+
4774+ if (move[i] == '+')
4775+ i++;
4776+ else if (move[i] == '#')
4777+ i++;
4778+
4779+ if (move[i] != '\0')
4780+ {
4781+ debug ("Move %s has unexpected characters", move);
4782+ return false;
4783+ }
4784+
4785+ return true;
4786+ }
4787+}
4788+
4789+public enum ChessResult
4790+{
4791+ IN_PROGRESS,
4792+ WHITE_WON,
4793+ BLACK_WON,
4794+ DRAW
4795+}
4796+
4797+public enum ChessRule
4798+{
4799+ CHECKMATE,
4800+ STALEMATE,
4801+ FIFTY_MOVES,
4802+ TIMEOUT,
4803+ THREE_FOLD_REPETITION,
4804+ INSUFFICIENT_MATERIAL,
4805+ RESIGN,
4806+ ABANDONMENT,
4807+ DEATH
4808+}
4809+
4810+public class ChessGame
4811+{
4812+ public bool is_started;
4813+ public ChessResult result;
4814+ public ChessRule rule;
4815+ public List<ChessState> move_stack;
4816+
4817+ private int hold_count = 0;
4818+
4819+ public const string STANDARD_SETUP = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
4820+
4821+ public signal void started ();
4822+ public signal void turn_started (ChessPlayer player);
4823+ public signal void moved (ChessMove move);
4824+ public signal void undo ();
4825+ public signal void ended ();
4826+
4827+ public ChessState current_state
4828+ {
4829+ get { return move_stack.data; }
4830+ }
4831+
4832+ public ChessPlayer white
4833+ {
4834+ get { return current_state.players[Color.WHITE]; }
4835+ }
4836+ public ChessPlayer black
4837+ {
4838+ get { return current_state.players[Color.BLACK]; }
4839+ }
4840+ public ChessPlayer current_player
4841+ {
4842+ get { return current_state.current_player; }
4843+ }
4844+ public ChessPlayer opponent
4845+ {
4846+ get { return current_state.opponent; }
4847+ }
4848+ private ChessClock? _clock;
4849+ public ChessClock? clock
4850+ {
4851+ get { return _clock; }
4852+ set
4853+ {
4854+ if (is_started)
4855+ return;
4856+ _clock = value;
4857+ }
4858+ }
4859+
4860+ public ChessGame (string fen = STANDARD_SETUP, string[]? moves = null)
4861+ {
4862+ is_started = false;
4863+ move_stack.prepend (new ChessState (fen));
4864+ result = ChessResult.IN_PROGRESS;
4865+
4866+ if (moves != null)
4867+ {
4868+ for (var i = 0; i < moves.length; i++)
4869+ {
4870+ if (!do_move (current_player, moves[i], true))
4871+ warning ("Invalid move %s", moves[i]);
4872+ }
4873+ }
4874+
4875+ white.do_move.connect (move_cb);
4876+ white.do_undo.connect (undo_cb);
4877+ white.do_resign.connect (resign_cb);
4878+ white.do_claim_draw.connect (claim_draw_cb);
4879+ black.do_move.connect (move_cb);
4880+ black.do_undo.connect (undo_cb);
4881+ black.do_resign.connect (resign_cb);
4882+ black.do_claim_draw.connect (claim_draw_cb);
4883+ }
4884+
4885+ private bool move_cb (ChessPlayer player, string move, bool apply)
4886+ {
4887+ if (!is_started)
4888+ return false;
4889+
4890+ return do_move (player, move, apply);
4891+ }
4892+
4893+ private bool do_move (ChessPlayer player, string? move, bool apply)
4894+ {
4895+ if (player != current_player)
4896+ return false;
4897+
4898+ var state = current_state.copy ();
4899+ state.number++;
4900+ if (!state.move (move, apply))
4901+ return false;
4902+
4903+ if (!apply)
4904+ return true;
4905+
4906+ move_stack.prepend (state);
4907+ if (state.last_move.victim != null)
4908+ state.last_move.victim.died ();
4909+ state.last_move.piece.moved ();
4910+ if (state.last_move.moved_rook != null)
4911+ state.last_move.moved_rook.moved ();
4912+ moved (state.last_move);
4913+ complete_move ();
4914+
4915+ return true;
4916+ }
4917+
4918+ public void add_hold ()
4919+ {
4920+ hold_count++;
4921+ }
4922+
4923+ public void remove_hold ()
4924+ {
4925+ return_if_fail (hold_count > 0);
4926+
4927+ hold_count--;
4928+ if (hold_count == 0)
4929+ complete_move ();
4930+ }
4931+
4932+ private void complete_move ()
4933+ {
4934+ /* Wait until the hold is removed */
4935+ if (hold_count > 0)
4936+ return;
4937+
4938+ ChessRule rule;
4939+ var result = current_state.get_result (out rule);
4940+ if (result != ChessResult.IN_PROGRESS)
4941+ {
4942+ stop (result, rule);
4943+ }
4944+ else
4945+ {
4946+ if (_clock != null)
4947+ _clock.active_color = current_player.color;
4948+ current_player.start_turn ();
4949+ turn_started (current_player);
4950+ }
4951+ }
4952+
4953+ private void undo_cb (ChessPlayer player)
4954+ {
4955+ /* If this players turn undo their opponents move first */
4956+ if (player == current_player)
4957+ undo_cb (opponent);
4958+
4959+ /* Don't pop off starting move */
4960+ if (move_stack.next == null)
4961+ return;
4962+
4963+ /* Pop off the move state and notify */
4964+ move_stack.remove_link (move_stack);
4965+ undo ();
4966+ }
4967+
4968+ private bool resign_cb (ChessPlayer player)
4969+ {
4970+ if (!is_started)
4971+ return false;
4972+
4973+ if (player.color == Color.WHITE)
4974+ stop (ChessResult.BLACK_WON, ChessRule.RESIGN);
4975+ else
4976+ stop (ChessResult.WHITE_WON, ChessRule.RESIGN);
4977+
4978+ return true;
4979+ }
4980+
4981+ private bool claim_draw_cb (ChessPlayer player)
4982+ {
4983+ if (!is_started)
4984+ return false;
4985+
4986+ if (current_state.halfmove_clock >= 100)
4987+ stop (ChessResult.DRAW, ChessRule.FIFTY_MOVES);
4988+ else if (is_three_fold_repeat ())
4989+ stop (ChessResult.DRAW, ChessRule.THREE_FOLD_REPETITION);
4990+ else
4991+ return false;
4992+
4993+ return true;
4994+ }
4995+
4996+ public void start ()
4997+ {
4998+ if (result != ChessResult.IN_PROGRESS)
4999+ return;
5000+
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: