Bridge Plugin
Render bridge hands and auction from RBN
Features
The Bridge plugin supports the display of bridge games from data about the hands and auction stored in data fields. The plugin supports three types of display through macros:
Macro |
Purpose |
BRIDGEHANDS |
Displays the hands dealt. |
BRIDGEAUCTION |
Displays the auction as recorded. |
BRIDGEPLAY |
Supports the play of the hands dealt. Incomplete hands are randomly completed. |
All data is expected in
Richard's Bridge Notation (RBN) which is well documented and in the public domain. Three fields are required for the plugin to be fully functional.
Field |
Purpose |
Board |
RBN "B" entry: Board Number |
Hands |
RBN "H" entry: Hands (cards held by each player) |
Auction |
RBN "A" entry: Auction (dealer, vulnerability and (optional) call sequence) |
The Bridge plugin accepts incomplete deals that have full hands missing. This is useful if you want to practice bidding. When you play these hands, the missing hands are completed randomly.
This plugin supports a wiki application, which is documented separately as the
BridgeApp. The application requires the Wiki Workbench and other plugins and contributions. For details refer to the documentation of the
BridgeApp.
Syntax
Common parameters for all macros
Parameter |
Purpose |
Default |
web |
The web where the topics that contain the hand descriptions are stored. |
BASEWEB |
topic |
The topic that contains the record of the hand to be played. Format web.topic is accepted. |
[BASEWEB].BASETOPIC |
%BRIDGEHANDS{ ... }%
Parameter |
Purpose |
Default |
board |
Show the dealt hands around a table. This parameter points to the gif presenting the table. on is shorthand for the default gif. |
(on ) System.BridgePlugin/bridgeboard.gif |
%BRIDGEAUCTION{ ... }%
Parameter |
Purpose |
Default |
rounds |
The number of rounds of the auction that will be displayed. <integer> | practice. Practice will display the auction in successive rounds from the bid of the dealer foreward. |
all |
%BRIDGEPLAY{ ... }%
Parameter |
Purpose |
Default |
deal |
Is the description of the hand complete? Values: full | partial | new. An incomplete hand will be randomly completed for play. |
partial |
zoom |
Scale the display from the size presented at ... Format x.y. |
0.7 |
Examples - BridgePlugin
The examples below assume the following field values associated with the BASEWEB.BASETOPIC:
Field |
Value |
Board |
B 12 |
Hands |
H W:T2.Q73.AK972.K95::QJ95.AKJ2.43.JT2 |
Auction |
A WB:1DXR1S:PPXA |
BRIDGEHANDS
%BRIDGEHANDS% |
%BRIDGEHANDS{ board="on" }% |
|
|
BRIDGEAUCTION
%BRIDGEAUCTION% |
|
|
|
%BRIDGEAUCTION{ rounds="practice" }% |
%BRIDGEAUCTION{ rounds="practice" }% |
|
|
BRIDGEPLAY
%BRIDGEPLAY%{ zoom="0.5" }% |
|
|
Installation
You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.
Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".
If you have any problems, or if the extension isn't available in
configure
, then you can still install manually from the command-line. See
http://foswiki.org/Support/ManuallyInstallingExtensions for more help.
Dependencies
Name | Version | Description |
---|
Foswiki::Contrib::WikiWorkbenchContrib | >=4.00 | Required |
Foswiki::Contrib::CopyContrib | >=3.00 | Required |
Change History
1.00 |
(31 Oct 2018) Initial release |