     [file version.texi not included]

Card Games for Emacs
********************

This manual is for Card Games for Emacs (version VERSION), an Emacs package that plays card games as UNICODE text in a terminal and as SVG cards on a graphical display.

Copyright © YEAR Corwin Brust.

     This manual is licensed under the Creative Commons Attribution 4.0 International License.  To view a copy of this license, visit https://creativecommons.org/licenses/by/4.0/.

     The Card Games for Emacs program is free software, licensed under the GNU General Public License, version 3 or later.

Introduction
************

Card Games for Emacs is a collection of more than thirty card games --- solitaires, two-player games, and four-handed partnership games --- played entirely inside GNU Emacs.

Every game draws itself two ways.  In a terminal it uses plain UNICODE text, so it works anywhere Emacs runs, including over ssh and on a phone.  On a graphical display it draws proper SVG cards, with a felt table for the four-handed games.  You can switch between these treatments at any time (see Customization).

You play with the keyboard, the mouse, or both.  A highlighted cursor marks the card or pile you are about to act on; the arrow keys move it and RET acts.  Clicking a card does the same thing.

The games are grouped into families that share an engine and a feel:

Solitaire
     Klondike, FreeCell, Spider, Yukon, Canfield, Forty Thieves, Scorpion, Golf, TriPeaks, Pyramid, Gaps (Montana), and Hell's Half-Acre, plus a one-player Russian Bank.  See Solitaire Games.

Trick-taking
     500, Hearts, Spades, Whist, Oh Hell, Euchre, Pitch, Briscola, and Contract Bridge.  See Trick-Taking Games.

Rummy
     Gin Rummy, Rummy, Rummy 500, and the partnership game Hand & Foot. See Rummy Games.

Matching, capturing, and climbing
     Go Fish and Old Maid; Scopa and Casino; President, Spite & Malice, and Cribbage.

Two-player Russian Bank
     The competitive duel, Crapette, against the computer.  See Russian Bank.

To start, type M-x card-game.

Installation
************

Card Games for Emacs needs GNU Emacs 26.1 or newer.  SVG display additionally needs an Emacs built with image support (any modern graphical Emacs has it); in a terminal the games fall back to text.

From a package archive
======================

When the package is available from a package archive, install it the usual way with M-x package-install RET card-games RET. The autoloads let you run M-x card-game straight away.

From source
===========

Clone the repository from https://code.bru.st/corwin/card-game.el, add it to your load-path, and load the umbrella file:

     (add-to-list 'load-path "/path/to/card-game.el")
     (require 'card-games)

Then M-x card-game.  You can also build an installable tarball with make package and install it with M-x package-install-file.

Building
========

The Makefile provides the usual developer targets:

make compile
     Byte-compile all the sources.

make test
     Run the ERT test suite.

make info
     Build this manual (also make html and make pdf).

make package
     Build the installable .tar.

The Game Menu
*************

M-x card-game (also available as card-games) opens the chooser: a buffer listing every game with a one-line description.  Move between games with TAB and S-TAB, or n and p, and press RET --- or click a game's name --- to start it. q buries the menu.

Two controls sit at the top of the list.

AI opponents
     Sets how hard the computer plays: easy, normal, or hard.  Click it to cycle, or use M-x card-games-set-ai-level. See Opponents.

Cards
     Chooses how the games are drawn: text, svg, or full. Click it to cycle, or use M-x card-games-set-treatment. See Display.

Playing
*******

Each game has its own rules and a few keys of its own, but the basic controls are the same everywhere.  Press ? in any game to see that game's keys in the echo area.

LEFT RIGHT UP DOWN
     Move the highlighted cursor between cards and piles.

RET
     Act on the cursor: pick up or drop a card, play it, or select it.  Many games also accept SPC.

mouse-1
     Click a card or pile to do the same as moving the cursor there and acting.

f
     Where there are foundations, send the chosen card to one.

u
     Undo the last move, in the games that support it.

n
     Deal a new game.

g
     Redraw the board.

?
     Describe the game's controls.

q
     Leave the game and return to the menu (see The Game Menu).

On a graphical display, + and - (and =) make the cards larger and smaller, and 0 resets the size.  Emacs's own text-scale-adjust works too.  Many boards show a one-line legend of the current game's keys along the bottom.

Customization
*************

All the options live in the card-games customization group; type M-x customize-group RET card-games RET to browse them. The most useful are collected here.

Display
=======

M-x card-games-set-treatment switches every game between three treatments: text draws UNICODE cards, svg draws SVG cards, and full additionally uses the full-window SVG table for the games that have one (Gaps and 500).  You can also cycle it from the menu (see The Game Menu).  A change takes effect the next time a game is drawn; press g to redraw an open game.

The card size follows cg-card-scale and the zoom keys (see Playing).

Cards and colours
=================

The pattern on a face-down card is cg-svg-card-back.  Besides dots, rings, and solid there are the drawn patterns lattice, waves, and diamond, and four backs stamped with an Emacs logo: emacs, emacs-classic, gnu, and splash.  The default, random, chooses a back for the session; M-x cg-svg-shuffle-card-back rolls a new one, and reopening the menu also re-rolls.

With cg-svg-four-color non-nil, clubs are drawn green and diamonds blue, so all four suits are told apart by colour.

cg-symbols maps each suit to the glyph used for it, in both the text and the SVG cards; customize it to use the outlined suits ♤ ♧ ♢ ♡, say, instead of the filled ones.

M-x card-games-set-theme applies a colour preset --- classic, dark, or contrast --- setting the felt colour, the card back, and the highlight together.  The individual colours (cg-svg-highlight-color, cg-bid-felt-color, and the rest) can also be set on their own.

Card buffers hide the text cursor by default, since you act on the highlighted card rather than on point; cg-cursor-type can bring it back.

The Emacs emblem
================

The full-window tables (500 and Gaps) show an Emacs emblem in a corner. cg-svg-emacs-logo chooses it: modern (the current Emacs icon, the default), classic (the older icon), gnu (a GNU head), splash (the startup image), drawn (a small built-in emblem), or none.  The image choices embed a logo that ships with your Emacs, falling back to the drawn emblem when it cannot be found.

Keys
====

cg-keys selects a movement scheme.  emacs (the default) follows Emacs conventions --- the arrow keys move and RET acts. classic additionally enables h j k l and SPC.  A change takes effect the next time a game starts.

Opponents
=========

cg-ai-level sets how hard the computer plays: easy, normal, or hard.  Russian Bank plays all three levels; the trick-taking games play a random legal card on easy and their usual game otherwise.  Other games do not yet consult it.  Set it with M-x card-games-set-ai-level or from the menu.

Solitaire Games
***************

The one-player games.  Most are tableau builders that share the same controls; the pile games (Golf, TriPeaks, Pyramid) and the gaps games (Gaps, Hell's Half-Acre) play a little differently and say so in their own sections.

The shared keys for the tableau builders are:

LEFT RIGHT
     Move the cursor between piles.

RET (or SPC)
     Pick up the card, or the movable run, under the cursor; press again on a destination to drop it.  On the stock, deal cards to the waste (or, when the stock is empty, recycle the waste where the game allows).

f
     Send the card under the cursor to a foundation.

a
     Auto-play the cards that plainly belong on the foundations.

u
     Undo the last move.

n / g / ? / q
     New deal, redraw, describe the keys, and return to the menu.

With cg-keys set to classic the vi keys h j k l move as well (see Keys).

Klondike
========

The classic.  Build the four foundations up in suit, Ace to King.  Seven columns hold a descending, alternating-colour tableau; move a card or an ordered run onto the next-higher card of the other colour, and fill an empty column with a King (or a King-headed run).  Turn cards from the stock to the waste --- one at a time by default --- and recycle the waste when the stock runs out.

Set cg-sol-klondike-draw to 3 for the harder turn-three variant.

Strategy.  Uncover face-down cards before anything else, and keep a column open for a King.  Do not rush low cards to the foundations if you may still need them to receive tableau cards.

FreeCell
========

Every card is dealt face up into eight columns, and four free cells each hold a single card.  Build the tableau down in alternating colour and the foundations up in suit.  How large a run you can shift at once depends on how many cells and empty columns are free.  Almost every deal can be won --- this is a game of skill, not luck.

Strategy.  Plan several moves ahead, free the aces early, and resist filling all four cells; an empty column is worth more than a full cell.

Spider
======

Two decks, ten columns, no separate foundations.  Build down regardless of suit, but only a same-suit run moves as a block.  Complete a King-to-Ace run in one suit and it is lifted off the table; clear all eight to win.  Press RET on the stock to deal one card to every column --- but only when no column is empty.

Strategy.  Build in suit whenever you have the choice, and empty a column as soon as you can: it is the key to untangling the rest.

Yukon
=====

Klondike's layout, dealt mostly face up, with one liberating difference: you may move any face-up card, together with everything piled on top of it, onto a card one higher of the other colour --- the group need not be in order.  There is no stock.

Strategy.  Expose the face-down cards; the freedom to lift buried groups wins many deals that Klondike would lose.

Canfield
========

A thirteen-card reserve, four tableau columns, and a stock dealt three at a time.  The first card sets the base rank for the foundations, which build up in suit and wrap from King round to Ace.  The tableau builds down in alternating colour, and an empty column refills from the reserve.

Strategy.  Clear the reserve --- it is the bottleneck --- and keep the wrapping base rank in mind when you choose what to bank.

Forty Thieves
=============

Two decks, ten columns, eight foundations.  The tableau builds down in suit and moves one card at a time; the foundations build up in suit; the stock deals to the waste with no redeal.  A hard, skilful game.

Strategy.  Be patient, keep the waste short, and avoid burying the low cards you will need.

Scorpion
========

Seven columns, built down in suit.  As in Yukon you may move any card with everything on top of it, ordered or not.  Free four King-to-Ace runs to win.  A small stock deals onto the first columns when you are stuck.

Strategy.  Dig the buried low cards out early, and think about which King you can afford to complete first.

Russian Bank
============

The one-player patience: eight houses built down in alternating colour, four foundations built up in suit from the Ace, and a thirteen-card reserve that feeds an empty house.  (For the competitive two-player game, see Russian Bank.)

Strategy.  Play to the foundations first and empty the reserve; the houses are just working space.

Golf
====

A layout of thirty-five cards over a single waste pile.  Play any exposed card onto the waste when it is one rank above or below the waste's top card; the sequence does not wrap, so nothing follows a King. Turn a fresh card from the stock when you are stuck.  Clear the whole layout to win.

Use the arrow keys or the mouse to choose a card, RET to play it (or, on the stock, to deal), u to undo, and n for a new deal.

Strategy.  Look for long up-and-down chains before you spend a card from the stock.

TriPeaks
========

Golf played over three overlapping peaks, with one change: the sequence wraps, so an Ace follows a King and a King follows an Ace.  That lets you run long chains across the peaks.  Clear all three to win.  The keys are the same as Golf.

Strategy.  Plan the chain that uncovers the most cards, and hold the stock in reserve for when the board truly stalls.

Pyramid
=======

A twenty-eight-card pyramid.  Remove pairs of exposed cards whose ranks sum to thirteen --- Ace counts 1, Jack 11, Queen 12, and a King is 13, so a King leaves on its own.  Mark one card and then its partner to remove them, and deal from the stock for more matches.  Clear the pyramid to win.

Strategy.  Free the cards that block two others at once, and do not strand a card whose only partner is already gone.

Gaps
====

Also called Montana.  The pack is dealt into four rows with gaps between the cards.  Each row is built as one suit, with a Two at the head, rising Two, Three, ..., up to the King.  Move a card into a gap when it continues the row --- the card one higher, in the same suit, than the card to the gap's left.  Fillable gaps are ringed and marked with a green +.

When no move remains, r reshuffles the misplaced cards for another try; you get a limited number of these redeals.  v toggles the full-window layout.  Order every row to win.

Strategy.  Open the gaps that let a Two, then a Three, begin each row, and spend redeals only when you are truly stuck.

Hell's Half-Acre
================

The same game as Gaps, built the other way: a King anchors the head of each row and the rows descend King, Queen, ..., down to the Two.  The controls are identical.

Trick-Taking Games
******************

In these games the four players each play a card to the trick, and the highest card (or the highest trump) wins it.  You sit South; the other three seats are computer players, and for the partnership games North is your partner.

Most of them share these controls:

LEFT RIGHT
     Choose a card in your hand.

RET (or SPC)
     Play the chosen card.  During the Hearts pass it instead marks a card.

p
     Confirm the Hearts pass, once three cards are marked.

n / g / ? / q
     New match, redraw, describe the keys, and return to the menu.

When a game calls for a bid, you are prompted for it in the minibuffer. See Opponents, to set how hard the computer plays.  500 and Bridge have richer boards and a few keys of their own, noted below.

500
===

Australia's national card game, and the flagship of this collection.  You and North play against East and West.  After the deal there is an auction: each side bids a number of tricks (six to ten) and a trump --- or Misère, to take no tricks at all.  The high bidder takes the five-card kitty, then discards five cards, and play begins.

The trump order runs Joker (highest), then the Jack of trump (right bower) and the other Jack of the same colour (left bower), then Ace down to Four.  Score the Avondale table for making or breaking the contract. A side wins by reaching 500 on a contract it made (the ``front door''), and loses by falling to -500 (the ``back door'').

b
     Make a bid; p passes.

RET
     Select the card, or the kitty card, under the pointer.

x
     Discard the five cards you have marked for the kitty.

v
     Toggle the full-window table.

M-UP M-DOWN
     Scroll the message log (the mouse wheel works too).

n / ? / q
     New game, help, and the menu.

500 can also be played live against other people over the network. See Networked Play.

Strategy.  Bid what your trumps and side-suit aces can actually make; take the kitty only when it can complete a contract; and keep Misère for a hand too weak to win a single trick.

Hearts
======

An avoidance game with no trump.  Every heart costs one point and the Queen of Spades costs thirteen, and you want as few as possible.  Before each hand you pass three cards to another player --- left, right, across, then a hand with no passing, and around again.  The Two of Clubs leads the first trick, on which no points may be played.

Take all the points in a hand and you ``shoot the moon'': the twenty-six are charged to everyone else instead.  When a player reaches 100 the game ends and the lowest score wins.

Strategy.  Void a suit so you can throw the Queen or a heart into it; keep track of who might hold the Queen; and only chase the moon with a hand that cannot be stopped.

Spades
======

Spades are always trump.  Each player bids the number of tricks they expect to win, and the two partners' bids are added: your side must make that combined total.  Extra tricks (``bags'') score a point each, but every tenth bag costs you 100.  A bid and made Nil --- no tricks at all --- scores 100, or loses 100 if broken.  Play to 500.

Strategy.  Count your sure winners before you bid; go Nil only with low spades and short, duckable side suits; and protect your partner's Nil when you can.

Whist
=====

The old English ancestor of Bridge, with no bidding.  The dealer's last card is turned for trump.  Follow the suit led if you can; trumps beat the plain suits.  Each side counts one point for every trick it wins beyond the book of six, and the first side to five wins.

Strategy.  Lead from your longest suit, draw the opponents' trumps, and remember the cards that have gone.

Oh Hell
=======

The hand shrinks every deal, from seven cards down to one, and a card is turned for trump.  Each player bids the exact number of tricks they will take and scores a bonus only for hitting it precisely --- one over or under and the bonus is lost.  Play the fixed run of rounds; it is every player for themselves.

Strategy.  On the small hands a high card is a sure trick and a low one a sure miss; do not be afraid to bid zero and duck everything.

Euchre
======

A brisk 24-card game (Nine to Ace).  The Jack of the trump suit (the right bower) and the other Jack of the same colour (the left bower) are the two highest trumps.  A card is turned up, and you may order it up as trump or, later, name a different suit.  The side that names trump must take three of the five tricks.  Partnership to 10.

You are asked whether to order up the turned card (y or n) and, if bidding comes round again, to name a trump.

Strategy.  Order up with three trumps, or two trumps and an off-suit Ace; a very strong hand can be played ``alone'' for a bigger score.

Pitch
=====

Auction Pitch.  Players bid for the right to pitch, and the pitcher's first lead sets the trump suit.  Thereafter follow the led suit if you can, but you may always trump instead.  Four points are at stake each hand --- High, Low, Jack, and Game --- and the first to seven wins.

Strategy.  Bid only on a solid trump holding, ideally with the Jack or with both the highest and lowest trumps.

Briscola
========

A 40-card Italian game.  One card is turned to fix the trump, the briscola, and --- unusually --- there is no need to follow suit: you may play any card to any trick.  Winning a trick captures its cards, and the Aces and Threes carry the most points.  Capture the points; the first to 61 of the 120 wins.

Strategy.  Save your briscole to capture the opponents' Aces, and lead worthless cards to coax points out of them.

Bridge
======

The full game: the auction, then the play with the dummy exposed, and rubber scoring.  You sit South and partner North against East and West.

In the auction you compose a call and make it: UP and DOWN change the level, LEFT and RIGHT change the strain, RET bids it, p passes, and d doubles.  When the auction ends, the declaring side's first player is declarer and their partner is the dummy, whose hand is turned face up; the declarer plays both hands, so you play the dummy from your seat when it is the dummy's turn.  Making your contract scores below the line toward game and the rubber.

arrows and RET
     Compose and make a call (auction), or choose and play a card (play).

p / d
     Pass and double, during the auction.

n / g / q
     Next deal, redraw, and the menu.

Strategy.  Count your high-card points, look for an eight-card trump fit with your partner, and plan the whole hand --- drawing trumps, setting up a long suit --- before you play to the first trick.

Rummy Games
***********

Draw a card --- from the stock or the discard pile --- then throw one away, and work your hand into melds: sets of three or four of a kind, and runs of three or more cards in one suit.

Gin Rummy
=========

Two-handed, with ten-card hands.  Draw from the stock (s) or take the up-card (t), then discard with RET.  When your unmatched cards --- your deadwood --- add up to ten points or fewer you may knock (k) and end the hand; with no deadwood at all you go gin for a bonus.  Your opponent then lays their own deadwood off onto your melds.  First to 100 points wins.

Strategy.  Keep cards that could join more than one meld, knock early against a slow hand, and note which cards your opponent takes.

Rummy
=====

Draw and discard, and lay your melds down on the table.  Mark the cards of a meld with SPC and lay it down with m; add a single card to a meld already on the table (yours or anyone's) with l.  Get rid of your whole hand to go out.

SPC / m / l
     Mark cards, meld them, lay one off.

s / t / RET
     Draw from the stock, take the up-card, discard.

Strategy.  Do not meld too soon --- cards on the table cannot be rearranged, and they tell your opponents what you hold.

Rummy 500
=========

Rummy played for points over many hands, first past 500.  You score the cards you lay down and lose the ones left in your hand.  Besides the top of the discard pile you may take a card from deeper in it with T, picking up that card and everything above it --- as long as you meld the chosen card at once.  Aces count 15.

Strategy.  Chase the high-scoring cards, and raid the discard pile when the reward outweighs the cards it puts in your hand.

Hand & Foot
===========

A partnership cousin of Canasta.  You are dealt a hand and a foot; play out the hand, then take up the foot.  Build books of seven cards of a rank --- clean with no wild cards, or dirty with some.  Twos and Jokers are wild; threes never meld. Draw two cards with s, or pick up the whole discard pile with p by melding its top card; meld (m), lay off (l), and discard (RET).  Your side goes out once it has two complete books and you have emptied your foot.

Strategy.  Hoard wild cards for clean books, and do not go out before your partner has played their foot.

Matching Games
**************

Two light games of collecting and shedding, good for a quick sit-down.

Go Fish
=======

Collect books of four of a kind.  On your turn pick a rank you hold --- click one of the rank buttons, or move the cursor to a card and it selects that rank --- then press 1, 2, 3, or 4 to ask that player for it.  If they have any they must hand them over and you ask again; if not, you ``go fish'' and draw from the stock.  Complete the most books to win.

Strategy.  Remember what everyone has asked for; it tells you who holds what.

Old Maid
========

One Queen is set aside, so a single Queen is left without a partner. Throw out every pair in your hand, then draw a card, unseen, from the next player: move over their face-down cards with the arrows (or click one) and press RET.  Whoever is left holding the odd Queen at the end loses.

Strategy.  Mostly luck --- but do not let your reactions reveal where the odd Queen is hiding.

Capturing Games
***************

Play a card from your hand to the table; if it matches, it captures table cards and takes them for scoring.  Press RET to play the card under the cursor.

Scopa
=====

A 40-card Italian game.  The card you play captures a single table card of the same value, or a set of table cards that add up to its value. Clearing the whole table at a stroke is a scopa and scores a bonus. At the end of each round you score for taking the most cards, the most coins, the Seven of Coins (the sette bello), and the primiera; play to 11.

Strategy.  Watch the running total on the table, and try to leave your opponent unable to make the capture that would sweep it.

Casino
======

The 52-card cousin of Scopa.  Number cards capture by value as in Scopa; face cards capture only by matching rank.  Score the big casino (the Ten of Diamonds), the little casino (the Two of Spades), the Aces, and the most cards and most spades; play to 21.

Strategy.  Guard the two casinos and grab spades when you can --- the little points decide close games.

Climbing Games
**************

Be the first to get rid of your cards by playing something that beats what is already on the table.

President
=========

Also called Scum.  The leader plays one to four cards of a rank; the next player must answer with the same number of a higher rank, or pass --- and here the Two is the highest card of all.  Whoever empties their hand first is President; the last one out is the Scum, and before the next deal the Scum must hand the President their best cards.

To lead more than one card of a rank, give a numeric prefix first --- C-u 2 RET leads a pair.  p passes.

Strategy.  Shed your low cards while the lead is cheap, and save your Twos and your pairs to grab the lead back when it matters.

Spite & Malice
==============

Race to empty your goal pile.  Four shared centre piles are built up from Ace to Queen, and Kings are wild.  On your turn play a card from your hand with RET, the top of your goal pile with G, or the top of one of your four discard piles with 1--4; then end your turn by discarding a hand card with d.  The first to clear their goal pile wins.

Strategy.  Spend a wild King to reach the next goal card, and keep your discard piles in order so you can unload them in turn.

Cribbage
********

The classic two-player game, pegged to 121.  Each deal has three parts.

First, both players lay two cards face down to the dealer's crib: mark them with SPC and confirm with m.  A starter card is then cut.  Next comes the play: take turns laying cards (RET), scoring as the running total reaches fifteen and thirty-one and for pairs and runs made along the way.  Finally, the show scores each hand and then the crib for its fifteens, pairs, runs, flushes, and his nobs (the Jack of the starter's suit).  First to 121 wins.

Strategy.  Weigh a strong hand against what you give away to the crib, and always be counting toward the next fifteen and thirty-one.

Russian Bank
************

Russian Bank, also called Crapette, is the competitive two-player ancestor of the solitaire (see Russian Bank Solitaire).  You (South) play against the computer (North), each with your own 52-card pack.

In the centre sit eight foundations, built up by suit from the Ace, and eight houses, built down in alternating colour; both are common ground either player may build on.  Each of you also has a thirteen-card reserve (its top card face up), a waste, and a face-down hand.  You win by getting rid of every card in your reserve, hand, and waste.

On your turn you make as many legal moves as you like:

  * move the top of your reserve, your waste, or any house onto a foundation or a house;

  * move a whole sequence (a run built down in alternating colours) from one house to another --- but only when there are enough empty houses to have shifted it a card at a time; and

  * load a card from your reserve or waste onto the opponent's reserve or waste, when it is the same suit and one rank higher or lower.

Foundation priority and ``Stop''.  A card that can go to a foundation must be played there before anything else.  If you build a house, load your opponent, turn a card, or end your turn while a foundation play is waiting, your opponent calls ``Stop!'' and your turn ends at once --- the piles that owe a foundation play are ringed to warn you.  Set cg-crapette-stops to nil for a gentler mode that simply blocks the slip instead of ending your turn.

When you can do no more, turn the top of your hand: if it fits somewhere you keep going, otherwise it goes to your waste and your turn ends.

arrows
     Move the cursor between piles.

RET (or click)
     Pick up the card or run under the cursor; press again on a destination to drop it.

f
     Send the chosen card to a foundation.

[ and ]
     Choose how many cards of a picked-up run to move onto an empty house.

SPC (or d)
     Turn the top card of your hand.

e
     End your turn.

u / n / q
     Undo, new game, and the menu.

cg-ai-level sets how hard North plays (see Opponents): on hard it even looks a move ahead to rearrange the houses.

Strategy.  Play to the foundations first, and empty your reserve --- it is the pile you must clear to win.  Load your spare cards onto your opponent to slow them down, and keep an empty house free as room to shift a sequence.

Networked Play
**************

500 can be played live against other people over a TCP connection.  One player hosts the game and the others join it.

M-x cg-bid-host RET PORT RET
     Start a game as the host.  You take the South seat and wait for others to connect.

M-x cg-bid-join RET HOST RET PORT RET NAME RET
     Connect to a host at HOST and PORT under a display NAME.

The game starts automatically once four people have joined.  The host may also press s to start early, with the computer filling any empty seats.

With cg-bid-shuffle-partners non-nil, the joining players are dealt randomly among the seats.  Each player's view is rotated so they sit South, so the ordinary controls (see 500) work unchanged. Play is turn-based and the host is authoritative; a client can join from anywhere Emacs can open a network connection.

Credits
*******

Card Games for Emacs was written by Corwin Brust.

The rules of the trickier games were checked against public references, chiefly Wikipedia and John McLeod's card-game site, Pagat (https://www.pagat.com/).  Thanks are due to the playtesters whose feedback shaped the controls and the display.

Much of the code, and this manual, were written by Corwin Brust in collaboration with Claude, an AI assistant made by Anthropic, over a series of pair-programming sessions.

License
*******

This manual is licensed under the Creative Commons Attribution 4.0 International License.  To view a copy of this license, visit https://creativecommons.org/licenses/by/4.0/.