Introduction
The Handplayer program, developed by Bridge Base On Line, LLC, can be
used to create bridge hands which can be played out with robots.
You may not use this program for commercial purposes without permission
from Bridge Base On Line, LLC.
You do not have permission to modify this program or to place copies of
it on your own server.
The Handplayer program can be run in any browser that supports
Javascript (and on which Javascript has been enabled). This includes
the browsers that come installed on, for example, the iPhone and G1
mobile phones (as well as any modern browser on any modern computer, of
course).
You can reach us at support@bridgebase.com
What sort of bridge hands can the Handplayer display?
- Full bridge deal (all 4 hands), which can be played out with
robots
- Final contract must be specified
- Intermediate bids may be shown.
- Opening lead and play to the first trick may be specified.
Embedding the Handplayer program in a web page
For most web publishing purposes, it will make sense to embed the
Handplayer application within a web page. The easiest way to do this is
by using an iframe. The HTML for doing so should look something like
this:
which will produce something like this
Web publishers can specify the amount of space that a given instance of
the Handplayer will occupy by setting the height and width of the
iframe (400 pixels and 500 pixels respectively in the above example).
The Handplayer program will resize itself so that it will fit in the
space that you provide for it.
Individual web pages can contain multiple iframes, each using an
instance of the Handplayer program.
Invoking the Handplayer program
The Handplayer program resides at this URL:
//www.bridgebase.com/tools/handplayer.html
In order for the Handplayer to display anything useful, you must pass
it the full deal, the contract and opening lead at a minimum.
Parameters are specified by appending a question mark character (?) to
the end of the above URL, followed by a list of parameter names and
values in this form:
//www.bridgebase.com/tools/handplayer.html?parameter=value1
Multiple parameter value combinations must be separated by an ampersand
character (&).
For example:
//www.bridgebase.com/tools/handplayer.html?parameter1=value1¶meter2=value2
The order in which multiple parameters are specified does not matter.
If multiple instances of the same parameter are specified, the first
such instance will be used and subsequent instances will be ignored.
Parameters for specifying dealer, hands, board number and
vulnerability
In order to enter all 4 hands using the Handplayer program, use the
parameter “
deal=” followed by:
- the word dealer, followed by : like this: “dealer:“
- the dealer’s compass direction (NSEW)
- the hands of the four players, separated by a vertical pipe
symbol |
- the board number
- the vulnerability
For example:
deal=dealer:S|south:sAK2hAK9876d2cJ32|west:s78hQJTdQJT98cKT9|north:s3456h2345dAKcAQ4|east:sQJT9hd34567c5678|board:16|vul:b
Some notes about specifying hands:
- the north, south, east, west
parameters are case sensitive
- each parameter must be followed by a colon (:) and the value
- the direction of the dealer (N,S,E,W) is not case sensitive
- the s,h,d,c suit specifiers and the card ranks AKQJT are
not case sensitive
- enter the suit symbol (s,h,d,c) followed by the cards in that
suit for the four suits in each hand. If the hand contains a void,
specify the suit indicator without any cards following it (e.g.
sAKJ96hdQ7483cJT3 would be correct showing a hand void in hearts) or do
not specify the suit indicator at all
- suits can be entered in any order
- use T (or t) to specify a 10
- you must specify all four hands
- the Handplayer will not allow you to specify a hand with more
than 13 cards nor to give the same card to 2 different seats
- The vul parameter
specifies the vulnerability. It takes values of n, e, b, and - (for
North-South vulnerable, East-West vulnerable, both vulnerable, and none
vulnerable respectively). If you do not specify the vulnerability, the
Handplayer will use the vulnerability of the specified board number. If
no board number is specified, the board number will show -1 with
neither side vulnerable.
Parameter for specifying the auction
Specify the auction using the “
bids=”
parameter. The value of this parameter consists of every call in the
auction concatenated into a single string containing no spaces or
dashes. Bidding starts with the dealer and continues clockwise. The
final contract must be followed by three passes. For example:
https://www.bridgebase.com/tools/handplayer.html?bids=1hp2np3dp4cp4sp6hppp
You may specify just the final contract by indicating a bid by the
intended declarer followed by three passes. For example:
https://www.bridgebase.com/tools/handplayer.html?bids=6hppp
Some notes about specifying calls in
the auction:
- bids are not case sensitive (1h is the same as 1H)
- use P for pass
- use N, not NT, for notrump bids
- use D for double
- use R for redouble
You can add explanations to specific calls in the auction by including
an appropriate explanation between parentheses - "(" and ")",
immediately after the call in question appears. For example:
//www.bridgebase.com/tools/handplayer.html?bids=1n(15-17)p3nppp
The 1NT bid in the auction diagram will be highlighted, and display the
explanation when clicked.
Parameter for specifying play to the first trick
The play sequence is specified using the “
play=” parameter. The value of this
parameter should consist of a series of cards. Each card consists of 2
characters. The first character is the suit of the card (S, H, D, or C)
and the second character is the rank of the card (2, 3, 4, 5, 6, 7, 8,
9, T, J, Q, K, or A). For example:
//www.bridgebase.com/tools/handplayer.html?play=HQ
The suit and rank are not case sensitive. Most times only the opening
lead is specified, but you can also specify the first card played from
the dummy. To do that, add the subsequent played card after the opening
lead. For example:
play=hqh3
Splash Screen
A splash screen that can be displayed while the program is loading. The
default text on the screen consists in two rows: “Bridge Base
Online Presents” (the header) and “Handplayer” (the body). These
two rows can be customized.
To hide the splash screen, set the parameter, “show_splash” to “n”.
For the header (splash_header) and body (splash_body), alphanumerical
characters and the card symbols are supported (♣♦♥♠).
Example of custom splash screen:
show_splash=y&splash_header=Today’s
Challenge&splash_body=Make 6♥
List of supported parameters
Parameter
|
Permitted
Values
|
Sub-parameters
|
Case
sensitive?
|
bids
|
p, d, r and 1,2,3,4,5,6,7
followed by n,s,h,d,c
|
|
no
|
play
|
c,d,h,s followed by akqjt98765432
|
|
no
|
deal
|
|
north, east, south,west, board,
vul
|
yes (except for “board“); use
only lower case
|
show_splash
|
y,n (default=y)
|
|
no
|
splash_header
|
Text and suit symbols
|
|
no
|
splash_body
|
Text and suit symbols
|
|
no
|