PDA

View Full Version : Hand layouts using codes and smilies


ianmac
05-10-06, 10:24 AM
You can define bridge hands using the hand layout macro codes

_KQ
_KJ643
_A1073
_KQ
7653___982
92_____108
52_____KQ84
AJ1087_6543
_AJ104
_AQ75
_J96
_92

(***Note if you do not see card symbols upgrade your browser***).

This hand was created using codes.
These codes can be entered automatically by clicking the "suit" on the codes menu (at the top of your editor screen) and enter the cards in the suit.
Note there is also a "spacer" or "filler" option so the hands can be layed out more clearly. The button with - showing is used for this purpose.

The result of doing this is a string of text as explained here:

Codes consist of an opening code, text, and a closing code.

The opening codes are "[" followed by a code letter and closed with "]".
The closing codes are "[/" followed by a code letter and closed with "]".

The text (cards) are placed in between that opening code and the closing code.


The code letters are s=spades h=hearts d=diamonds c=clubs.

There is a special "filler" code too.
This code letter is "f".
The text in the filler is at least one "_" (or similar such as ".") but you get 10 spaces by default before the "_".

The above hand was typed as follows, but note the space after each "[" should not be there. If there were none of these spaces in this example it would appear as above!


[ f]_[/f][ s]KQ[/s]
[ f]_[/f][ h]KJ643[/h]
[ f]_[/f][ d]A1073[/d]
[ f]_[/f][ c]KQ[/c]
[ s]7653[/s][ f]___[/f][ s]982[/s]
[ h]92[/h][ f]_____[/f][ h]108[/h]
[ d]52[/d][ f]_____[/f][ d]KQ84[/d]
[ c]AJ1087[/c][ f]_[/f][ c]6543[/c]
[ f]_[/f][ s]AJ104[/s]
[ f]_[/f][ h]AQ75[/h]
[ f]_[/f][ d]J96[/d]
[ f]_[/f][ c]92[/c]



Also your "smilies" now have the card symbols included.
Clicking a smily will put two letters in the text that will be replaced by the card symbol. You may also just type the text of a smily by putting these two letters for the symbol required.

sx = spade .
hx = heart .
dx = diamond .
cx = club .

Therefore the text "sx hx dx cx" appears as:


sx hx dx cx

Via this method you can say for example
Opening lead is hxA

:)

ianmac
07-10-06, 06:59 AM
Note the "[" shown in the examples here are followed by a space to leave them readable.

sx AJ10943

is a combination of a smily inside the filler code and entered as:


[ F]sx[/F] AJ10943


The hand in the previous post then can be shown as:

sx KQ
hx KJ643
dx A1073
cx KQ
sx 7653. .sx 982
hx 92. . . hx 108
dx 52. . . dx KQ84
cx AJ1087cx 6543
sx AJ104
hx AQ75
dx J96
cx 92

In North and South the filler contains just the card smily.
West does not have a filler at all, just the card smily.
East has filler with dots followed by the card smily.
Also note in this example above I used ". . ." etc. in the filler (i.e. single spaces between "." characters). Of course any more than one space will be reduced to one (see below).

Then there is the use of the suit codes in the [ code] [/code] pair combination like:

QJ743
KQ5
854
Q6


This was entered by typing:


[ CODE]
[ S] QJ743[/S]
[ H] KQ5[/H]
[ D] 854[/D]
[ C] Q6[/C]
[ /CODE]

Note the text entered within the [ code][/code] pair means the layout you use remains fixed during display. That is, the spaces typed by you are left as you put them when they are ultimately shown by the browser. Normally spaces in excess of one are "dropped" by the browser. This is called white-space and any amount of white space is reduced to one space except in the [ code][/code] pair. A code pair can be placed around any amount of formatted text by highlighting the text and clicking the # code button.