BBO Logo

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?

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&parameter2=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:

For example:

deal=dealer:S|south:sAK2hAK9876d2cJ32|west:s78hQJTdQJT98cKT9|north:s3456h2345dAKcAQ4|east:sQJT9hd34567c5678|board:16|vul:b

Some notes about specifying hands:

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:
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