Command Line Options
- -e expr
- Evaluate the Tcl expression expr. Not very
useful, but occasionally good for setting variables
which affect the user's script, like:
deal -i userscript -e "set maxnorth 10"
- -v
- Verbose mode. Lets you know how many hands have
been accepted and how many hands have been tried.
- -[NSEW] hand-spec
- Specifies the cards held by the specified hand.
The hand-spec should be of the form:
"AK8532 - KQ72 A65".
Voids must be represented with a '-' character.
hand-spec should be one argument,
so the string should be quoted on the command line.
- -i file
- Source the commands in the file named. The language
used is "Tcl". Read the man page for Tcl for help
in writing Tcl code. Additions to Tcl specific to deal are
listed in this manual.
- -x file
- Like -i, except execute this file and then exit.
- -f
- Instead of dealing new hands, reads hands from
standard input. The hands must be in the format
put out by "deal -l". You might deal, say, 10,000
hands which satisfy specific criteria, saving them
to a file. Then you can use that output for input
with deal -f to find out which hands satisfy other
constraints.
- -t
- Print distribution table and exit.
The distribution table is an ordered list
of all possible hand patterns for a single
hand.
- -l
- Write deals in a "single-line" format. In previous
releases this was the default format. It is useful
for piping to formatters written in other languages.
Most formatting can be defined internally, using
Tcl now. Still useful with the "-f" option.
Simple Usage
The most basic usage of the program is to generate random deals
with no conditions:
% deal 2
S : QJ9
H : AJ
D : T52
C : AKQ84
S : 752 S : AK83
H : T85 H : Q632
D : AK8763 D : J4
C : 2 C : T96
S: T64
H: K974
D: Q9
C: J753
---------------------------
S : QJ9
H : 52
D : AKJT9
C : A86
S : 763 S : A52
H : T763 H : J98
D : Q54 D : 876
C : T95 C : KQJ7
S: KT84
H: AKQ4
D: 32
C: 432
---------------------------
If you want a raw format, more readable by external programs,
use the -l flag, which prints deals in a single-line format:
% deal -l 5
K75 T987 AQT5 95|AQ86 2 943 QJ643|JT32 J43 KJ KT82|94 AKQ65 8762 A7
QJ96 KQ6 T95 K76|T5 J953 A72 AJT9|8432 A7 83 Q8432|AK7 T842 KQJ64 5
K52 QJT9 AKQ K63|AJ AK7542 T732 8|94 3 J965 QJT972|QT8763 86 84 A54
A76 A764 43 KJT2|J9 KJ53 K986 A87|K8543 T82 72 953|QT2 Q9 AQJT5 Q64
Q6 QJ75 3 AJ7642|AT9874 KT963 AT |K32 4 QJ2 KQ9853|J5 A82 K987654 T
This output form is crude; it is meant to be post-processed. Each
line is of the form:
"North|East|South|West"
Each hand is specified by:
"Spades Hearts Diamondsar> Diay.tcl will use the value stored doubledummy.txt.
For Programmers
- Implementation:
- Tcl
- Location:
format/ddline
|