Add two-player Russian Bank (Crapette) vs the computer

* cg-crapette.el: new game on cg-core — eight foundations (up by suit,
two decks), eight shared houses (down, alternating colour), per-player
reserve/waste/hand; foundation priority; loading onto the opponent; a
greedy AI; text UI with cursor pick/drop, undo, and q-to-menu.
* card-games.el: require cg-crapette and add the chooser entry.
* Makefile (EL): add cg-crapette.el.
* test/card-games-tests.el: 5 ERT (deal, legality, win, AI turn, AI foundation).
This commit is contained in:
Corwin Brust 2026-07-01 03:09:27 -05:00
parent f54d2d3213
commit 0d8901041f
5 changed files with 690 additions and 3 deletions

View file

@ -58,6 +58,7 @@
(require 'cg-trick-ext)
(require 'cg-spite)
(require 'cg-bridge)
(require 'cg-crapette)
(defvar card-games-list
'(("500 (Bid)" cg-bid
@ -82,6 +83,8 @@
"Shedding: match the suit or rank; eights are wild.")
("Canfield" cg-canfield
"Solitaire: a 13-card reserve and a shifting foundation base rank.")
("Russian Bank" cg-russian-bank
"Solitaire: eight houses down by alternating colour; a reserve feeds them.")
("Forty Thieves" cg-forty-thieves
"Solitaire: two decks, ten columns, eight foundations, no redeal.")
("Scorpion" cg-scorpion
@ -125,7 +128,9 @@
("Spite & Malice" cg-spite
"Climbing patience: race to empty your goal pile; Kings are wild.")
("Bridge" cg-bridge
"Trick-taking: the auction, the dummy, and rubber scoring, to 121."))
"Trick-taking: the auction, the dummy, and rubber scoring, to 121.")
("Crapette (Russian Bank)" cg-crapette
"Two-player Russian Bank versus the computer; empty your reserve, hand, and waste."))
"Registry of playable games.
Each entry is (NAME COMMAND DESCRIPTION); `card-game' lists them.")