~ubuntu-branches/ubuntu/utopic/dealer/utopic

« back to all changes in this revision

Viewing changes to debian/patches/manpages

  • Committer: Package Import Robot
  • Author(s): Christoph Berg
  • Date: 2012-03-04 14:24:11 UTC
  • mfrom: (3.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20120304142411-ul50frh0qxv26eck
Tags: 0.20040530-4
EnableĀ buildĀ hardening.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- dealer-0.20040530.orig/dealer.dpp.pod
 
2
+++ dealer-0.20040530/dealer.dpp.pod
 
3
@@ -0,0 +1,167 @@
 
4
+=head1 NAME
 
5
+
 
6
+dealer.dpp - preprocessor for dealer scripts
 
7
+
 
8
+=head1 SYNOPSIS
 
9
+
 
10
+B<dealer.dpp> [I<inputfile>]
 
11
+
 
12
+=head1 DESCRIPTION
 
13
+
 
14
+dealer.dpp stands for dealer-pre-processor. Its main purpose it to preprocess
 
15
+input files for Hans van Staveren's great dealer program.
 
16
+
 
17
+=head1 SYNTAX
 
18
+
 
19
+The program expands shape specifications of the form:
 
20
+
 
21
+    shape{COMPASS, shp1 + shp2 + ... + shpM - shm1 - ... - shmN}
 
22
+
 
23
+=head2 regular shapes
 
24
+
 
25
+7xxx, 4432, 4xx5 have the same meaning as in original dealer.
 
26
+
 
27
+=head2 the `at least' operator
 
28
+
 
29
+whenever you put a `+' after a suit-length, it means `at least'.
 
30
+
 
31
+    shape{north, 5+xx5+}: at least 5/5 in the blacks,
 
32
+ -->shape(north,5xx5 + 5xx6 + 6xx5 + 5xx7 + 6xx6 + 7xx5 + 5008 + 6007
 
33
+                + 7006 + 8005)
 
34
+
 
35
+=head2 the `at most' operator:
 
36
+
 
37
+same as the `at least', just use a `-':
 
38
+
 
39
+    shape{north, 2-xxx}: at most 2 spades,
 
40
+ -->shape(north,0xxx + 1xxx + 2xxx)
 
41
+
 
42
+=head2 the `range' operator:
 
43
+
 
44
+the range operator operates on a single suit. It comes with [],
 
45
+like in Perl.
 
46
+
 
47
+    shape{north, x[3-5]x[13]}: (3 to 5) hearts, and one or 3 clubs 
 
48
+ -->shape(north,x3x1 + x4x1 + x3x3 + x5x1 + x4x3 + x5x3)
 
49
+
 
50
+Note that shape{north, 3-xxx} is equivalent to shape{north,[0-3]xxx}
 
51
+You can write compound ranges if you want:
 
52
+
 
53
+    shape{north, [013-68]xxx} means: 0,1,3,4,5,6 or 8 spades.
 
54
+
 
55
+=head2 the `permutation' operator:
 
56
+
 
57
+the permutation operator will appears as () like in the WBF rules
 
58
+of specifying shapes.
 
59
+
 
60
+    shape{north, (4432)}: any 4432 hand.
 
61
+ -->shape(north,any 4432)
 
62
+
 
63
+what's best is that the () operator can operate on restricted groups
 
64
+of cards:
 
65
+
 
66
+    shape{north, 5s(431)}: 5 spades, the others suits being (431).
 
67
+ -->shape(north,5134 + 5314 + 5143 + 5341 + 5413 + 5431)      
 
68
+
 
69
+What you have to do is:
 
70
+
 
71
+=over
 
72
+
 
73
+=item *
 
74
+
 
75
+specify the suit names (s,h,d,c in english) in the left part of
 
76
+the shape, in any order,
 
77
+
 
78
+=item *
 
79
+
 
80
+and enclose the rest of the permutation into () in the right part.
 
81
+
 
82
+=back
 
83
+
 
84
+A (complicated) example:
 
85
+
 
86
+    shape{north, 4+c3+d(2+2+)}: at least 5 clubs, at least 3 diamonds, 
 
87
+                               and no short major.
 
88
+ -->shape(north,3334 + 4234 + 2434 + 3244 + 2344 + 2254 + 3235 + 2335 + 2245 + 2236)
 
89
+
 
90
+=head2 the `Major' operator:
 
91
+
 
92
+has to be used together with the () operator. `M' stands for `a major'
 
93
+The `M' operator can only be used in the left part (never put a M
 
94
+inside the parens)
 
95
+
 
96
+    shape{north, 5M(xxx)}
 
97
+ -->shape(north,x5xx + 5xxx)
 
98
+
 
99
+    shape{north, 5+M3+c(31)}
 
100
+ -->shape(north,1534 + 3514 + 1633 + 3613 + 5134 + 5314 + 6133 + 6313)
 
101
+
 
102
+=head2 the `minor' operator:
 
103
+
 
104
+same as the `Major' operator, but in lowercase `m'.
 
105
+
 
106
+    shape{north, 5M5m(xx)}
 
107
+ -->shape(north,x5x5 + 5xx5 + x55x + 5x5x)
 
108
+
 
109
+=head2 the `conditional' operator:
 
110
+
 
111
+you've got the possibility of specifying complex conditions to be
 
112
+verified that cannot be simply expressed by other operators. In
 
113
+order  to do that, you use the `:' operator, just after the
 
114
+atomic-shape specification:
 
115
+
 
116
+    shape{north, shp1:condition1,condition2,...}
 
117
+
 
118
+The conditions use the letters (s,h,d,c) as variables for the suit
 
119
+lengths, and the usual C-operators (*,+,-,/,>,<,==,!,?, and so on).
 
120
+Note that the `,' stands for the `and-logical' operator. You can
 
121
+use `or' for the `or-logical' operator.
 
122
+
 
123
+    shape{north, 4+s4+h(xx):d>c,h+s==10}
 
124
+ -->shape(north,6421 + 6430 + 5521 + 5530 + 4621 + 4630)
 
125
+
 
126
+=head1 EXAMPLES
 
127
+
 
128
+=over
 
129
+
 
130
+=item a balanced hand
 
131
+
 
132
+ (3+3+3+2+)
 
133
+
 
134
+=item a french 1H opening
 
135
+
 
136
+ x5+xx:h>s,h>=d,h>=c
 
137
+
 
138
+=item my No_trump opening
 
139
+
 
140
+ hn = hcp(north)
 
141
+ n1NT = (hn > 14 and hn < 18 and shape{north, 5m(332) + 5m2s(42)} )
 
142
+     or (hn > 13 and hn < 17 and shape{north, 6m(322)}            )
 
143
+     or (hn > 15 and hn < 18 and shape{north, 5M(332)}            )
 
144
+     or (hn > 15 and hn < 19 and shape{north, (4432) + (4333)}    )
 
145
+
 
146
+=back
 
147
+
 
148
+=head1 SEE ALSO
 
149
+
 
150
+dealer(6),
 
151
+F</usr/share/doc/dealer/Manual>.
 
152
+
 
153
+=head1 AUTHORS
 
154
+
 
155
+=over
 
156
+
 
157
+=item Francois Dellacherie
 
158
+
 
159
+=item Manpage: Christoph Berg <cb@df7cb.de>
 
160
+
 
161
+=back
 
162
+
 
163
+=head1 LICENSE
 
164
+
 
165
+This program is hereby put in the public domain. Do with it whatever
 
166
+you want, but I would like you not to redistribute it in modified form
 
167
+without mentioning the fact of modification. I will accept bug reports
 
168
+and modification requests, without any obligation of course, but fixing
 
169
+bugs someone else put in is beyond me.
 
170
+
 
171
--- dealer-0.20040530.orig/dealer.pod
 
172
+++ dealer-0.20040530/dealer.pod
 
173
@@ -0,0 +1,133 @@
 
174
+=head1 NAME
 
175
+
 
176
+dealer - bridge hand generator
 
177
+
 
178
+=head1 SYNOPSIS
 
179
+
 
180
+B<dealer> [-023ehuvmqV] [-p I<n>] [-g I<n>] [-s I<seed>] [-l I<n>] [I<inputfile>]
 
181
+
 
182
+=head1 DESCRIPTION AND EXAMPLE
 
183
+
 
184
+The program dealer can be used to generate hands for partnerships bidding training or for generating
 
185
+statistics that can be used to design conventions, or win postmortems.
 
186
+
 
187
+Running the program involves 3 steps. First, the user has to write an input file containing
 
188
+hand-descriptions and action. A very simple example would look something like:
 
189
+
 
190
+    condition shape(north, any 4333 + any 4423) and hcp(north)>=19
 
191
+    action printall
 
192
+
 
193
+The first line specifies a condition for the north hand, in this case, a hand with 4333 or 4432 shape
 
194
+and at least 19 high card points. The second line tells the program to print the 4 hands. The program
 
195
+reads from standard input, so in principle, it is possible to enter the conditions directly into the
 
196
+program. Using a file is a lot more practical though, as it allows the user to re-use conditions and
 
197
+fine-tune the conditions.
 
198
+
 
199
+Then the program has to be run, it reads the file, looks at the various command line switches and then
 
200
+produces a number of hands. The output appears on the screen but can be re-directed to a file.
 
201
+
 
202
+Finally, the user has to look at output and analyze the produced hands. Alternatively, the output can
 
203
+be used for a playing program.
 
204
+
 
205
+=head1 OPTIONS
 
206
+
 
207
+=over
 
208
+
 
209
+=item B<-e>
 
210
+
 
211
+Exhaust mode (alpha version).
 
212
+
 
213
+=item B<-g> I<number>
 
214
+
 
215
+Maximum number of hands to generate (default is 1000000).
 
216
+
 
217
+=item B<-l> I<number>
 
218
+
 
219
+Instead of shuffling, deals are read from the file library.dat by M. Ginsberg
 
220
+(see [1]). When using this, the tricks() function is quite fast and bridge.exe
 
221
+from GIB is not used.
 
222
+
 
223
+[1] ftp://ftp.cirl.uoregon.edu/pub/users/ginsberg/bridge/
 
224
+
 
225
+=item B<-m>
 
226
+
 
227
+Shows a progress meter.
 
228
+
 
229
+=item B<-p> I<number>
 
230
+
 
231
+Maximum number of hands to produce (default is 40).
 
232
+
 
233
+=item B<-q>
 
234
+
 
235
+Suppress PBN output (useful for testing, then switch it back on when generating the "final" sample).
 
236
+
 
237
+=item B<-s> I<number>
 
238
+
 
239
+Uses number as the seed for the random generator, running the program twice
 
240
+with the same seed will produce the same sequence of hands.
 
241
+
 
242
+=item B<-u>
 
243
+
 
244
+Select uppercase for the symbols "AKQJT" (default is lowercase).
 
245
+
 
246
+=item B<-v>
 
247
+
 
248
+Toggle verbose output, prints statistics at the end of the run (default is on).
 
249
+
 
250
+=item B<-V>
 
251
+
 
252
+Emit a version-identification string and exit.
 
253
+
 
254
+=item B<-h>
 
255
+
 
256
+Help, prints the syntax.
 
257
+
 
258
+=item B<-0>
 
259
+
 
260
+No swapping, each deal is generated normally (shuffling) (default).
 
261
+
 
262
+=item B<-2>
 
263
+
 
264
+2-way swapping, after each shuffle another deal is generated by permuting E and
 
265
+W, leaving N and S in place (NB: not fully compatible with predeal).
 
266
+
 
267
+=item B<-3>
 
268
+
 
269
+3-way swapping, after each shuffle another 5 deals are generated by permuting
 
270
+E, W, and S every which way, leaving N in place (NB: not fully compatible with
 
271
+predeal).
 
272
+
 
273
+=back
 
274
+
 
275
+=head1 BUGS
 
276
+
 
277
+I would prefer if you did B<not> use this program for generating hands
 
278
+for tournaments. I have not investigated the random number generation
 
279
+closely enough for me to be comfortable with that thought.
 
280
+
 
281
+=head1 SEE ALSO
 
282
+
 
283
+F</usr/share/doc/dealer/Manual>,
 
284
+dealer.dpp(6),
 
285
+deal(6).
 
286
+
 
287
+=head1 AUTHORS
 
288
+
 
289
+=over
 
290
+
 
291
+=item Hans van Staveren <sater@sater.home.cs.vu.nl>
 
292
+
 
293
+=item Henk Uijterwaal <henk@ripe.net>
 
294
+
 
295
+=item Manpage: Christoph Berg <cb@df7cb.de>
 
296
+
 
297
+=back
 
298
+
 
299
+=head1 COPYRIGHT AND LICENSE
 
300
+
 
301
+This program is hereby put in the public domain. Do with it whatever
 
302
+you want, but I would like you not to redistribute it in modified form
 
303
+without mentioning the fact of modification. I will accept bug reports
 
304
+and modification requests, without any obligation of course, but fixing
 
305
+bugs someone else put in is beyond me.
 
306
+