summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/onedown/examples/Play.tex
blob: 7c0a157d3dada0c055d6d0f6699cba45a2087aa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
\documentclass[onedown-examples]{subfiles}

\begin{document}
Here we show the playing tricks diagram. For the user, the environment |play| is like a 4
column table. Its mandatory argument denotes the player with the opening
lead. With the optional argument the user can specify the trump suit. The
default is |N| for \NT. All leads must have a suit, although this is not
checked by \OneDown. If a suit is
followed, you don't have to repeat the suit: a rank suffices to specify the
card. Of course at discards or when ruffed, the suit must be entered too.

The |play| diagram has a special feature: it knows which player wins the
trick and thus 1) you do not have to specify who has the lead, except of
course the opening lead, and 2) it calculates (and displays) the tricks won
by each side.
\vfill
\begin{HBox}{{Playing tricks table. Trump is \Cl\hfill File: \FileName}}
\newgame\resetfonts
\begin{play}{W}[C]
   H3  & 4  & K  & 6  \\
   C3  & 5  & Q  & 2  \\
   H5  & 2  & A  & 8  \\
   C7  & D9 & J  & K  \\
   S3  & 4  & Q  & 6 \\
   SA  & C4  & 2  & T  \\
\end{play}
\end{HBox}
\vfill
It is posible to use either the shorthands (|C, D, H, S|) for the suits as
well as the code (e.g.\ |\Cl| itself, as you can see here. Refer to Bidding
examples for further details.

In the environment |play| the consistency of the cards played is checked. As
an example the error about card \He\,5 (ocurring $2\times$ in the same trick)
is reported.
\vfill
\begin{HBox}{{Same, but with suit commands\hfill File: \FileName}}
\begin{play}{W}[C]
   \He3   & 4    & K  & 6  \\
   \Cl3   & 5    & Q  & 2  \\
   \He5   & 5    & A  & 8  \\
   \Cl7   & \Di9 & J  & K  \\
   \Sp3   & 4    & Q  & 6 \\
   \Sp A  & K    & 2  & T  \\
\end{play}
\end{HBox}
\vfill
In the next example for a \NT contract, we have changed the language. Here
the double occurence of \Cl\,6 in two different tricks is shown. 
\vfill
\begin{HBox}{Playing tricks table for \NT in Dutch\hfill File: \FileName} 
\begin{otherlanguage}{dutch}
\begin{play}{W}
 C3  & Q   & K   & 2  \\
 SJ  & A   & 4   & 2  \\
 C4  & 6   & T   & 5  \\
 CA  & ST  & 6   & 9  \\
 C7  & HT  & D5  & S5 \\
 D2  & T   & 3   & 4  \\
\end{play}
\end{otherlanguage}
\end{HBox}
\vfill
\vfill
\begin{HBox}{The same table in German\hfill File: \FileName}
\begin{otherlanguage}{german}
\begin{play}{W}
 C3  & Q   & K   & 2  \\
 SJ  & A   & 4   & 2  \\
 C4  & 6   & T   & 5  \\
 CA  & ST  & 6   & 9  \\
 C7  & HT  & D5  & S5 \\
 D2  & T   & 3   & 4  \\
\end{play}
\end{otherlanguage}
\end{HBox}
\vfill
\end{document}
\endinput