\documentstyle[12pt]{article}
\newcommand{\xpat}{{\tt xpat}}
\newcommand{\xsol}{{\tt xsol}}
\newcommand{\freecell}{{\tt FreeCell}}
\newcommand{\klondike}{{\tt Klondike}}
\newcommand{\spider}{{\tt Spider}}
\newcommand{\gypsy}{{\tt Gypsy}}
\newcommand{\seahaven}{{\tt Seahaven Towers}}
\title{\xpat\ Version 1.2 Manual}
\author{Heiko Ei\ss{}feldt \and Michael Bischoff}
\date{07-Apr-1994}
\begin{document}
\maketitle
\tableofcontents
\section{Introduction}
\subsection{\xpat\ --- a generic patience game for X}
\xpat\ was created by merging the \spider\ patience game\footnote{Copyright (c)
  1989, Dave Lemke, Heather Rose, Donald R. Woods and Sun Microsystems, Inc.},
the \xsol\ solitaire game (also known as \klondike\ under DOS) and the rules of
some other patience games.  Its main features are variable rule sets and
different card sets for different resolution monitors.

\subsection{Quickstart, or How to Avoid Reading this Manual}
If you already know \spider\ and don't want to read this documentation,
just type
\begin{center}
  {\tt xpat -rules Spider}.
\end{center}
to start \xpat\ with Spider rules using similar (but not identical) keyboard
and mouse commands. To see the possible command-line options, type
\begin{center}
  {\tt xpat -?}.
\end{center}
If you know the manual of the previous release, you are possibly interested
in the last section which gives a short overview of the changes.

If you are new to this game, and want to know more, read on.

\subsection{Naming conventions}
Card {\em suits} are {\tt Clubs}, {\tt Spades}, {\tt Hearts}, and {\tt
  Diamonds}.  The {\em ranks} go from {\tt Ace} to {\tt King}.
There are different types of places where cards lie, or where you may
place cards. We call all such locations {\em piles}.
One pile contains the cards which have not been distributed yet. This
is the {\em deck}. The piles where some cards are put at new-game, and
where you move them, are called {\em slots}. Finally, the piles
where you place the sorted arrays of all ranks and same suit, are
the {\em stacks}.

\section{Special Rulesets}
As mentioned before, \xpat\ knows about different patience rules.
You can choose one of them by typing
\begin{center}
  {\tt xpat -rules ({\em ruleset\/})}
\end{center}
at the command prompt, or by simply linking \xpat\ to \spider,
\gypsy, \freecell, or \klondike\ and calling the program with one of that
names.

\subsection{Rules for \spider}

Remark:
\begin{itemize}
\item This section is adapted from the \spider\ documentation. See the file
  {\tt COPYRIGHT.Spider} for details.
\end{itemize}
The object of the game is to build a sequence of cards in the same suit from
King to Ace and move it from the slots to the stacks above.  When
all eight sequences have been built and removed, you have won the game.  A
more challenging version of this is to leave all eight sequences on the table
until done instead of removing those that are complete to the stacks above.

One may move the next lower card onto a card of the same or different suit;
however, one may only move contiguous cards of the same suit as a group.  For
example, one may move the 5 of spades into either a 6 of spades or a 6 of
hearts. Moving the 5 of spades onto the 6 spades is a better move since now
the 5--6 of spades group may be moved as a unit where the 5 of spades, 6 of
hearts group may not.  Also, moving the 4 of spades onto the 6 of spades is
not a legal move.  A King may only be moved into an empty slot (or removed 
to the stacks above when the sequence King--Ace is complete) 
since there are no higher cards than a King.

For general strategy, one wants to try to create a {\em space} since this is
the most flexible way to move cards around.  A space is where all cards in
one column of the table have been removed.  Note:  before dealing the next
round, all spaces have to have at least one card in them.

Also, when moving the cards, it is generally to your advantage to move
the highest cards first and the lowest cards last doing the obvious moves
first.  For example, move a 5 of spades onto a 6 of spades, then Queen of
hearts onto a King clubs before you move the 7 of clubs onto the 8 of hearts.
Then you may choose to move 5--6 of spades group onto the 7 of clubs.  The
strategy is to combine the cards into same suit groups that may be moved as
a unit.  Once the group 5--6 of spades has been created, it may be broken
up by using the middle mouse button on the lower card.


\subsubsection*{The Initial Tableau}
Shuffle together two decks of cards (104 cards in all)
and deal ten cards face down in a row.  Deal three more rows face down on the
first.  Next deal one card face down on each of four piles (traditionally the
leftmost four, but it doesn't matter; for aesthetic reasons some people
prefer the first, fourth, seventh, and tenth piles), for a total of 44
face-down cards.  Finally, deal one card face up on each pile.  These 54
cards constitute the initial tableau.  NOTE: In the description below, the
card at the {\em bottom} of a pile is taken to be the last one dealt or played
onto that pile, as opposed to the card that is underneath all the others in
the pile.  Thus the {\em bottom card} is the one displayed bottommost on the
screen by the Spider program.

\subsubsection*{Building}
All building is done in the tableau, there being no separate
foundations.  On the bottom card of a pile may be placed any card of
next-lower rank, regardless of suit.  (Cards rank King (highest), Queen,
Jack, 10, 9, \ldots, 3, 2, Ace.)  The bottom card of a pile is always
available to be moved, as is any sequence of cards at the bottom of a pile
that are consecutive and ascending in rank and of the same suit.

For example, suppose the 6, 5, and 4 of hearts are together at the bottom of
a pile, with the 4 bottommost.  They may be moved as a unit, or the 4 can be
moved by itself, or the 5 and 4 can be moved without moving the 6.  If the 6,
5, and 4 were moved onto a 7 of hearts at the bottom of some other pile, the
four cards could then be moved as a unit onto any 8; if the 7 were not a
heart, however, then once the hearts were placed upon it it would not be
available to be moved until the hearts had been moved from it (to another 7
or into a space; see below).

When all face-up cards have been removed from a pile, the bottom face-down
card is turned up and becomes available for play.

\subsubsection*{Spaces}
When all cards have been moved away from some pile, the resulting
empty pile is called a {\em space} or {\em hole}.
  Any card or sequence of cards available for moving may be moved into a space.
  A King, or sequence headed by a King, can be moved {\em only} into a space, 
and once moved there can never be moved out (except into another space, which
doesn't accomplish anything) unless it is being removed entirely as described
below.

\subsubsection*{The Deck}
The 50 cards not dealt initially form the {\em deck}.  Whenever you
wish (typically, whenever you get stuck), you may deal a new row of ten cards
from the hand face-up upon the piles.  NOTE: You are not allowed to do this
if you have any spaces.  You must first fill them in.  Notice that these
additional deals tend to introduce discontinuities in the piles; that is, you
can get cards covering others that are not next-higher in rank.  If you get
stuck after having dealt the last of the five additional deals, you have
lost.

\subsubsection*{Object of Play}
When you have assembled a complete suit of thirteen cards,
in sequence from King down to Ace, at the bottom of a pile, you may remove
the thirteen cards from the tableau entirely.  Cards so removed are never
brought back into play; thus it is not always desirable to remove a suit when
you have the opportunity (though it usually is), since it may pay to keep it
around to aid in manipulating the other cards of that suit (recall that there
are 26 cards in each suit).  The game is won if you manage to remove all
eight suits.

If you find that a game is going so well that you're sure you're going to
win, you can spice things up by trying to finish with as many completed suits
as possible still in the tableau.  Hardest of all is to finish the game with
each of the eight suits brought together in sequence from King down to Ace,
with all of the cards still in the tableau.  Note that, once you start
striving toward such a goal, you may make such a mess of the position that
you won't be able to win at all!

\subsubsection*{Scoring}
Spider is a difficult game to master, and some players like to be
able to evaluate their progress by scoring unsuccessful games.  No rules for
scoring are in the literature, but the program implements the following
rather arbitrary formula:  10 points for each initially face down card that
gets turned over; 15 additional points for each column where all the face
down cards have been turned over (even if you don't manage to get a space);
2 points for each card that is sitting atop the next higher card of the same
suit; 50 points for each completed suit (in which
case you do not also score for the 12 cards sitting atop next higher cards).
This yields a maximum score of 990.  If you win the game with 4 or more
completed suits still in the tableau, add 2 points for each suit after the
first three.  Thus winning with all eight suits still in the tableau yields
a score of 1000.


\subsection{Rules for \gypsy}
(These rules are described by giving the differences to the \spider\ rules.)
\gypsy\ is played with two decks of 52 cards. You have eight slots,
and at the start of the game, three cards are dealt to each slot. Two cards
lie facedown, and the bottom card is faceup.

One may move the next lower card onto a card only if their colours differ.
For example, one may move the 4 of Clubs onto the 5 of Hearts or the 5
of Diamonds. The same rule applies for moving contiguous groups of cards:
a group of cards can be moved as a block if the ranks of the cards are
decreasing and their colours alternate.

Cards are moved to the stacks one at a time, in increasing rank, starting with
the Ace.  A card can only be moved to a stack of its suit.  It is a good choice
to move all Aces to the stacks immediately.  It can be wiser, however, to keep
cards of higher ranks on the slots, so you can put other cards on top of them.
Cards can be moved back from the stacks to the slots ({\tt borrowing}) if they
follow the above rule to append.  
This can be useful if want to create empty slots in order to move kings to
these.
(You may move {\em any\/} card to an empty slot, but empty slots are the only
places where kings may be moved to.)

\subsubsection*{Scoring}
\gypsy\ scores from 0 to 1000. There are two points of score for each
alternating card pair on the slots and
there are five points for each card on the stacks.
Every stack which is filled from Ace to King adds another 60 points
to the score.

\bigskip
Remark: The rules for \gypsy\ are no invention from the authors of \xpat, but
the name \gypsy\ is. We are playing \gypsy\ for years now and just don't know
what the rules were originally called. Should you happen to know,
tell us.


\subsection{Rules for \klondike}
\klondike\ is the traditional patience game and is played using only one set of
cards. We have four stacks and seven slots. Initially, the first slot has one
card on it, the second one two, and thus continuing up to the seventh slot,
which gets seven cards.  Of these cards, only the topmost card is turned
face-up.  \klondike\ introduces another type of pile: There is a second deck 
which holds face-up cards. Every time you request dealing of new cards, these 
cards are moved onto the open deck pile.
You can move cards from this pile to the
slots or to the stacks, but you never can move cards back to the open deck.
The rules which card may be grouped together are similar to the rules for the
\gypsy\ game. The only difference is that you may only move a king onto an
empty slot.

Once all cards are dealt, you can flip all the cards of the open deck back
onto the other deck and continue. You can flip the deck up to three times.

\subsection{Rules for \freecell}
This variant has been shamelessly borrowed from the Microsoft Windows
entertainment package. The rules introduce a new pile type, which we call {\em
  register\/}. A register may hold only one card at a time, but this may be an
arbitrary one. This is to compensate the fact that all cards are dealt at the
start of game, which makes it very difficult to achieve a free slot.
The cards dealt initially do not often form valid groups. You have to rearrange
them, possibly using the registers as scratch storage.  To get a free slot you
have to build groups of cards which alternate in colour and have decreasing
ranks.

The rules are easy to understand if you know \gypsy\ already
since the rules for moving cards are the same.  \freecell\ is played with one
deck of cards. You have four registers, four stacks, and eight slots.

\subsection{Rules for \seahaven}
\seahaven\ is similar to \freecell\ (or the other way round, I don't know which
game was the first to exist). We have ten slots, and four registers, but it is
more difficult since cards may only be moved onto cards of the same suit and
you can only move kings to empty slots. The original \seahaven\ game had yet
another restriction: When moving blocks of $n$ cards, you must have at least
$n-1$ registers free (moves were supposed to be single-card moves). This has
been dropped in this implementation, since it implied that only blocks of five
cards maximum could be moved.

\subsection{Customized Rules}
You can customize the standard rules by giving the command line options
\begin{center}
  \begin{tabular}{ll}
    {\tt -slots} {\em slots\/} & to change the number of slots\\
    {\tt -decks} {\em decks\/} & to change the number of decks\\
    {\tt -faceup} {\em num\/} or &\\
    {\tt -facedown} {\em num\/} & to set the initial number of\\
    &  faceup / facedown cards per slot \\
    &  (\spider\ and \gypsy\ only)\\
    {\tt -flips} {\em num\/} & to set a limit on the number \\
    & of flip operations\\
    & (\klondike)\\
    {\tt -turn} {\em num\/} & to change the number of\\
    & cards turned at each deal\\
    & (\klondike)\\
    {\tt -jokers} {\em jokers\/} & to have some jokers\\
  \end{tabular}
\end{center}

\begin{itemize}
\item Customizing the rules will change the maximum score.
 Currently, it actually does disable scoring.
\item Jokers are an experimental feature. An image is supplied with the
  internal cardset only. Use them if you want to, but there are no
  well-developed rules for patience with jokers.

  Note that hints will not display every possible move with jokers (that
  would give too many). The hint algorithm assumes that you know you
  can put a joker on {\em any\/} slot. With jokers, you can move {\em very\/}
  long groups, since they paste together subsequences.

  Jokers may not go onto the stacks. A game is finished when all ordinary cards
  are moved to the stacks.
\end{itemize}


\section{Keyboard and Mouse Commands}
\subsection{Mouse Commands}
Three buttons of the mouse are supported.
The actions depend on where you press a button.

When the mouse pointer
is in the area of a card pile,
the left mouse button (Button 1) does a quick move (if possible) and is only valid for slots.
That is, a set of cards
is moved to an automatically selected destination pile. This can either
be a stack or another slot.
If the destination is a stack, the vertical position of the pointer
is ignored. If the destination is a slot, a maximal number of cards is moved,
but the position of the pointer limits the selection. If, for example,
the cards ten, nine and eight lie on top of a slot, and the mouse points
to the nine, the eight and possibly the nine are selected to move
(given that the colours match), but not the ten.
Movement to stacks has priority over movement to other slots.

If you want to select the destination slot yourself, use the middle button.
This will select a set of cards. The selected cards should appear shaded.
(Or, if you like, are surrounded by a dashed or coloured line. See options
{\tt -markcolor}, {\tt -markwidth}) You may now move to the destination
and press the middle button again. Now the move will be done, if legal.
To abort the procedure, just press on the source pile again.
This command is also useful to see the length of sequences on the slots. To see
the largest sequence to move, press the middle button when the mouse pointer
is over the first dealt card in the column. It will then be marked (to unmark
press it again).

After you have played a while, you will notice that the slots grow. When the
bottom border of the window is encountered, the cards are shifted more closely
together, such that they fit on the window. At some critical point, you cannot
see what cards are on the slot any more (except for the card on top of the
slot), because the cards are shifted too closely together.  Move the pointer to
the card you want to identify and press the right button. The whole card will
be exposed to the foreground. It will disappear when you release the button.
Hold down the button and move up and down the slot. The exposed cards are
updated immediately as you move.

To use special commands (undo, redo, new game, quit) press the left button
when the pointer is in the area of the appropriate text field on the top.
Commands which can't be undone require a confirmation in the middle of the
window.
% The ``restart'' command requires no confirmation. Here, ``undo'' works.

\subsection{Keyboard Commands}
Some commands can also be used with the keyboard, but you cannot play the game
with a keyboard alone.% due to X11 you need as well a pointing device (mouse)
The keyboard commands are mostly equal to commands in the \spider\ game, but
not all. Some functions of \spider\ are missing in this implementation.
The following table gives an overview about the possible commands:
\begin{center}
  \begin{tabular}{|c|l|c|l|}
    \hline
    key & action & key & action\\
    \hline
   ``{\tt a}'' & play this game again&
   ``{\tt d}'' & deal new cards\\
   ``{\tt l}'' & compute new layout&
   ``{\tt n}'' & play a new game\\
   ``{\tt o}'' & move one card to stack&
   ``{\tt o}'' & move one card to stack\\
   ``{\tt O}'' & move all cards to stack&
   ``{\tt q}'' & quit game\\
   ``{\tt r}'' & redo a move&
   ``{\tt s}'' & show the current score\\
   ``{\tt u}'' & undo a move&
   ``{\tt v}'' & print the version number\\
   ``{\tt ?}'' & suggest a move&
   ``{\tt \ }'' & do the suggested move\\
   ``{\tt F}'' & switch to \freecell\ rules&
   ``{\tt G}'' & switch to \gypsy\ rules\\
   ``{\tt H}'' & switch to {\tt Seahaven} rules&
   &\\
   ``{\tt K}'' & switch to \klondike\ rules&
   ``{\tt S}'' & switch to \spider\ rules\\
   {\tt ESC} & abort a command&
   ctrl-L & redraw the window\\
    \hline
  \end{tabular}
\end{center}
Some commands require confirmation, for example the quit command.
Use ``{\tt y}'' or ``{\tt n}'' to confirm or cancel.
All commands which have no different uppercase meaning (like ``{\tt o}'')
accept the uppercase character also.


\section{Card Sets and Layout}
\subsection{Layouts}
In contrast to other patience implementations, \xpat\ supports dynamic layout
of the window\footnote{Currently, there is only one layout for the
\freecell\ rules.}.
Basically, there are two types. The first one we call the {\em big\/} layout.
This can be characterized by the fact that the stacks are placed to the right
of the slots, whereas in the {\em small\/} layout, they are above the
slots\footnote{Actually, there are 3 smaller layouts which differ slightly}.
The advantage of placing them at the side is, that the slots can grow larger
in vertical direction, so you do not need to expose cards so often.
The disadvantage is, that the window needs more space, except when you have
many stacks. Initially, a minimum
window size is determined by the program. This window size is large enough
for one of the layout types.
The initialization routine computes the area needed for either layout type
and chooses the one with smaller space.
If you resize the window, the layout is changed dynamically.

At the command line, you can choose to have smaller or greater gaps between
the cards. ({\tt -gapx} and {\tt -gapy} option, initially both are set to~4.)
With the default values, \spider\ can be played in the large layout on a
$1024\times 768$ display.

\subsection{Card sets}
\subsubsection*{Built-in Cards}
\xpat\ supports different card sets without the need to recompile.
One set of cards is built-in, so you can play \xpat\ without the need of
carrying additional files. 
The built-in cards have size $79\times 123$ and are basically the large
cards from the \spider-game, with some minor modifications to make them
more symmetric.

\subsubsection*{Colour Cards}
On colour displays, you may want to have more than only red and black for the
card images. By using the {\tt Xpm}-library of Arnaud Le Hors (Groupe Bull)
and its {\tt pixmap} editor, a colour version of {\tt bitmap}, the images
of the king, queen and jack cards and the cardback were coloured.
If you want colour cards, untar the {\tt xpat-dat-1.2.tar} file to some
directory (we suggest {\tt /usr/games/lib/xpat}) and start \xpat\ with the
command
\begin{center}
  {\tt xpat -xpmdir /usr/games/lib/xpat/xpmcards1}
\end{center}
(of course, you can use X11-resources for this job).
By default, {\tt /usr/games/lib/xpat} is \xpat's LIBDIR, and if a directory
does not contain a slash, the LIBDIR is prepended. So you may type shorter
\begin{center}
  {\tt xpat -xpmdir xpmcards1}
\end{center}
Be patient, loading the colour cards will take some time.
The current set needs about 20 colours.

If you want to have more colours, or want to create you own favorite
cardback image, simply use the {\tt pixmap} program on the {\tt .xpm}-files.
See the file {\tt COPYRIGHT.xpm} for details concerning the use of the {\tt
  Xpm}-package.

You can have different sets of colour images if you put them
in different directories. (The blue ones for mondays, the pink ones for the
rainy days. Whatever you want.)

To meet the requirement of different card proportions, you can write the
dimension of the cards in the file {\tt Cards.conf} in the same directory
were the {\tt .xpm} files reside. {\tt xpat} will then adjust the sizes of
all internal cards to these dimensions.

Example: We have scanned nice old french cards (really french cards: the suit
symbols are V, D, and R) at 33 dpi. Unfortunately, this gives $86\times118$
cards instead of $79\times123$. So we simply wrote the line
\begin{center}
  {\tt 86 118}
\end{center}
to {\tt Cards.conf} and {\tt xpat} knows about the desired size.
This is intended for small changes only, using values such as $30\times50$
does not work.

If there were no big black monster of copyright restrictions, we would gladly
add these cards to the distribution. As soon as we find nice cards which are
guaranteed to be free of copyrights, these will be included.  (There was a
discussion concerning card copyrights in {\tt alt.binaries.pictures} some weeks
ago.)

For your own experiments: Using 64 to 100 colors in the quantisizing step
seems to be a good choice. Less colours tend to look ugly, whereas more colours
use too much resources on 256-colour systems (and it's hard to see a
difference). A small quickhack {\tt suit.c} is included into the source
distribution which can display antialiased suit symbols in different sizes on
the screen.

Note: The {\tt Xpm}-package version 3.2g (or greater, I suppose),
supports Gzip-compressed images, so you can {\tt gzip} all {\tt .xpm}-files.
This nice feature saves a lot of space on your hard disk.


\subsection{External card sets}
If you have low resolution graphics, you can choose other card sets.
Type
\begin{center}
  {\tt xpat -cards /usr/games/lib/xpat/small.cards}
\end{center}
or simply
\begin{center}
  {\tt xpat -cards small}
\end{center}
to use the external card set {\tt /usr/games/lib/xpat/small.cards}.
These cards are the small cards from \spider, they have a resolution of
$40\times60$. The external cards are distributed in the {\tt
  xpat-dat-1.2.tar.gz} archive.

There is a third card set, {\tt french.cards}, of resolution $60\times93$
for medium resolution displays.
The images of this card set are inspired by the ``Franz\"osisches Blatt'',
the type of cards which are used in Germany\footnote{These are not
the cards which are called ``Deutsche Spielkarten''.
They have even different suit symbols and are used seldom today.}.
The letters ``B'', ``D'', and ``K'' stand for ``Bube'', ``Dame'', ``K\"onig''.

\noindent


\section{Bells, Whistles, and Doodads} %Miscellaneous

\subsection{Saving Games}
You can save the current state of the game by pressing the left mouse button on
the ``save game'' button. \xpat\ will try to create a file with its name
consisting of the name of the rule set as base name and the current seed as
extension. If this name is too long for your filesystem, the base name is
truncated.
% Is this fixed? I don't have any Minix filesystems now.
%\footnote{At least this {\em should\/} happen. Unfortunately, the
%  POSIX.1 function {\tt pathconf()} seems not to be supported yet in Linux
%  (0.99.5 / libs 4.3.2). {\tt pathconf(\_PC\_NAME\_MAX)} returns 255 as
%  maximum filename length even on MINIX filesystems. Thus the filename will be
%  truncated at the end and the last digits of the seed will get lost there.}
If the file did exist, it will be overwritten. Error messages will appear on
{\tt stderr}.

\subsection{Logging of successful played games}
\xpat\ tries to log successfully
solved games in {\tt /var/games/xpat.log}. Create that file with mode 0666,
if you want that. (Or, more UNIXy: create user {\tt xpat}, {\tt chown xpat xpat},
make {\tt xpat} SUID, give write permissions to {\tt xpat} only. Do as you like it.)
To change the place for the log file, you have to recompile \xpat.
Compile loadsave.c with
\begin{verbatim}
-DSCOREFILE=\"/home/mbi/xpat.log\"
\end{verbatim}
to have the logfile in the directory {\tt /home/mbi}.

\subsection{Sound (Linux and Suns only)}
On Linux systems, you may include support for FM sound or for digitized sound
into {\bf xpat}. You need Hannu Savolainen's sound-kit
version~2\footnote{With version 1 of the sound kit, you'll have to change
{\tt \#include <sys/soundcard.h>} into {\tt \#include <linux/soundcard.h>} in
the file {\bf sound.c}.}.

To use FM sound, you have to load an instrument into midi-channel~9 of
the kernel (some type of bell, usually).
Then you will hear these bells ringing when you successfully played a game.
FM sound support uses the device {\tt /dev/sequencer}.

To use digitzed sound, make sure that {\tt /dev/audio} is writable for all.
The directory for the sound files is compiled into the {\tt sound.o} module.
The default is {\tt /usr/games/lib/xpat}. The directory is given by the
{\tt LIBDIR} macro, which must be defined when you compile {\tt sound.c}
Sound files are distributed in the {\tt xpat-dat-1.2.tar.gz} archive.

\subsection{{\tt .Xdefaults} names}
The following table gives an overview about the mappings of command line
options to their corresponding Xdefaults names.
\begin{center}
{\tt
\begin{tabular}{|l|l||l|l|}
\hline
  {\rm option} & {\rm resource name} & {\rm option} & {\rm resource name}\\
\hline
    -rules &     Rules &
    -xpmdir &    XpmDir\\
    -cards &     Cards&
    -slots &     Slots\\
    -flips &     Flips&
    -turn &      Turn\\	
    -decks &     Decks&       
    -faceup &    Faceup\\      
    -facedown &  Facedown&    
    -jokers &    Jokers\\ 	
    -cround &    CardRound&   
    -bround &    ButtonRound\\ 
    -bx &        ButtonGapX&  
    -by &        ButtonGapY\\  
    -gapx &      GapX&        
    -gapy &      GapY\\        
    -cb &        CardbackColor&
    -bg &   	 TableColor\\   
    -markcolor & MarkColor& 
    -markwidth & MarkWidth\\ 
    -arrowcolor &ArrowColor&
    -sound &     Sound\\
    -bfont &     ButtonFont\\
    -sfont &     StatusFont&
    -geometry &  Geometry\\  
\hline
\end{tabular}
}
\end{center}

\medskip\noindent
Example: I have inserted the line

  {\tt XPat*XpmDir: /usr/games/lib/xpat/xpmcards1}

\noindent
into my {\tt .Xdefaults} file to have colour cards. If you are missing the
background colour and wider spaces between the cards from \spider, just insert 

  {\tt XPat*TableColor: SeaGreen}

  {\tt XPat*GapX: 20}

  {\tt XPat*GapY: 20}

\noindent
there. With the \spider\ rules and internal cardset, the corresponding
window will be about 1020 pixels wide.


\subsection{Known Bugs}
\begin{itemize}
\item There is no test whether allocating a colour has succeded.  If you have
  {\tt xv} running or some colourful background, \xpat\ may appear
  white-on-white. Some think, it's a feature to make it more difficult :--)
\item At startup, all the cards seem to be drawn twice.
\item Loading of colour cards ({\tt .xpm}-files) is too slow.
\end{itemize}
\subsection{Unknown Bugs}
Should you find an unknown bug, please e-mail a short description to
\begin{center}
  {\tt mbi@mo.math.nat.tu-bs.de}
\end{center}
A bug is something which either gives weird effects or behaves differently
as described in this manual.
%  Typos in this manual are also bugs.
% (Of these, there are possibly tons! Hope my mailbox won't explode.)

\subsection{Other Rules}
To see the possible rules currently implemented in \xpat, type
\begin{center}
  {\tt xpat -rules ?}.
\end{center}
Due to the well-known discrepancy of a program with its documentation,
there may be more rules implemented than described here.

%We are currently working on the implementation of \freecell, a game which
%comes as demo with Windows/NT.
By the way, did you know that \spider\ is
available under the name {\bf Arachnid} for Microsoft Windows?


If you know other patience rules and want us to implement them, mail
a short description of the rules to the above address.
(No promise, as some rules are {\em very\/} different and some things
are hard-coded into \xpat.)

\input history.tex

\section{Copyright}
Copyright \copyright\ 1993, 1994 by Heiko Ei\ss{}feldt and Michael Bischoff\\
({\bf mbi@mo.math.nat.tu-bs.de}).
\par\noindent
Copyright \copyright\ 1990 by David Lemke \& Network Computing Devices, Inc.\\
({\bf lemke@ncd.com})
\par\noindent
Copyright 1990 Heather Rose and Sun Microsystems, Inc.
\par\noindent
Copyright \copyright\ 1989, Donald R. Woods and Sun Microsystems, Inc.
\par\smallskip\noindent
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation. 

\medskip\noindent
\xpat\ was developed under Linux, the free UNIX for the IBM-PC and compatibles.
\xpat\ is based on the game \spider.
All new code which is not covered by \spider\ copyrights
is distributed by terms of the GNU General public license (GNU CopyLeft).
\end{document}