Debian Codegraph @

ex/3nt-nostack.tcl

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 #
2 #
3 # To run:
4 #
5 # deal -i ex/3nt-nostack.tcl
6 #
7 # Find deals where south is "AK K52 98765 962" and north has a gambling
8 # 3nt hand.
9 #
10 # This uses the definition: Solid 7-9 card minor suit, no 4-card major or
11 # 5+ card in the other minor, no controls outside the solid suit.
12 #
13 # This is slower than the smart-stacking version by an order of magnitude
14 # when requesting 1000 deals.
15 #
16 source format/none
17
18 south is "AK K52 98765 962"
19
20 source ex/3nt-common.tcl
21
22 set diamonds 0
23 set clubs 0
24
25 main {
26 reject unless {[gam3NT.shape north]}
27 reject unless {0==[gam3NT.suit north]}
28 if {[diamonds north]>=7} { incr diamonds } { incr clubs }
29 puts "-- [north shape]"
30 accept
31 }
32
33 deal_finished {
34 #puts "Solid diamonds: $diamonds"
35 #puts "Solid clubs : $clubs"
36 }
37
38 #
39 # Copyright (C) 1996-2001, Thomas Andrews
40 #
41 # This program is free software; you can redistribute it and/or modify
42 # it under the terms of the GNU General Public License as published by
43 # the Free Software Foundation; either version 2 of the License, or
44 # (at your option) any later version.
45 #
46 # This program is distributed in the hope that it will be useful,
47 # but WITHOUT ANY WARRANTY; without even the implied warranty of
48 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49 # GNU General Public License for more details.
50 #
51 # You should have received a copy of the GNU General Public License
52 # along with this program; if not, write to the Free Software
53 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
54 #