Add Contract Bridge: auction, dummy play, and rubber scoring
New cg-bridge.el: a four-handed Bridge game (you are South, partnering North against East and West) on the shared cg-game base. * Auction: level/strain bids plus pass, double, and redouble, with the three-pass end rule, pass-outs, doubling state, and declarer determination (first of the side to name the strain). * Play: follow-suit with the dummy exposed after the opening lead; the declarer plays both hands. Trick resolution honours trump and no-trump. * Scoring: classic rubber -- trick points below the line toward game; overtricks, slam, insult, and undertrick penalties above; vulnerability and the rubber bonus. Verified against known results. * A small natural bidding AI (openings, NT, raises with a fit, simple overcalls) that always terminates the auction, plus a greedy card-play AI. Wire cg-bridge into the chooser, the Makefile, and the README, and add two ERT tests (scoring math and a dozen full AI-driven deals). The suite is now 109/109 and every file byte-compiles cleanly.
This commit is contained in:
parent
905d5989c2
commit
09adcaa3ea
5 changed files with 780 additions and 2 deletions
|
|
@ -57,6 +57,7 @@
|
|||
(require 'cg-scopa)
|
||||
(require 'cg-trick-ext)
|
||||
(require 'cg-spite)
|
||||
(require 'cg-bridge)
|
||||
|
||||
(defvar card-games-list
|
||||
'(("500 (Bid)" cg-bid
|
||||
|
|
@ -122,7 +123,9 @@
|
|||
("Briscola" cg-briscola
|
||||
"Trick-taking: fixed trump, no follow; capture the points to 61.")
|
||||
("Spite & Malice" cg-spite
|
||||
"Climbing patience: race to empty your goal pile; Kings are wild."))
|
||||
"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."))
|
||||
"Registry of playable games.
|
||||
Each entry is (NAME COMMAND DESCRIPTION); `card-game' lists them.")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue