Debian Codegraph @

texmf-dist/source/latex/wargame/tests/chits.dtx

raw
1 % \section{Some test chits}
2 %
3 % \iffalse
4 %<*testchits>
5 % \fi
6 % Some chits for testing stuff
7 %
8 % \begin{macrocode}
9 \makeatletter
10 \def\firstchit{%
11 \@ifnextchar[{\@firstchit}{\@firstchit[]}%]
12 }%
13 \def\@firstchit[#1]{
14 % \chitdbglvl=5
15 % \natoappdbglvl=5
16 \chit[symbol={
17 echelon=army,
18 main=infantry,
19 lower=mountain,
20 faction=friendly,
21 left={text=A},
22 frame={fill=yellow!50!black},
23 ultra thick,
24 command=land,
25 },
26 left={chit/identifier={1}},
27 right={chit/identifier={2}},
28 factors={chit/2 factors={4,8}},
29 frame={draw=black},
30 color=white,text=yellow,fill={blue},
31 #1]}
32 \def\secondchit{%
33 \@ifnextchar({\second@chit}{\second@chit(0,0)}%)
34 }
35 \def\second@chit(#1){
36 \node[draw, chit={symbol={[main=fixed wing,
37 faction=friendly,
38 lower={text=F},
39 command=air](0,-.15)},
40 left={[{red,font=\noexpand\sffamily}]chit/identifier={Fighter}},
41 right={chit/identifier={USAF}},
42 fill=white,
43 factors={chit/1 factor=3}}] at (#1){};}
44 \def\thirdchit{
45 \chit[symbol={[echelon=battalion,
46 main={[fill]artillery},
47 faction=friendly,
48 command=land,
49 below=wheeled]},
50 left={chit/identifier={XVII}},
51 right={chit/identifier={IJA}},
52 factors={chit/2 factors artillery={2,6,5}}]}
53 \def\fourthchit{
54 \chit[symbol={[main=fixed wing,
55 faction=friendly,
56 lower={text=F},
57 command=air](0,-.15)},
58 left={[{red,font=\noexpand\sffamily}]chit/identifier={Fighter}},
59 right={chit/identifier={USAF}},
60 factors={chit/1 factor=3}]}
61 \tikzset{
62 wg/big text/.pic={
63 \node[shape=rectangle,
64 font=\sffamily\fontsize{18}{0}\selectfont]{#1};}}
65 \def\turnchit{
66 \chit[full={wg/big text={Turn}},black,fill=yellow!20!white]}
67 \tikzset{
68 my chit/.style={/chit/symbol={[
69 faction=friendly,
70 command=land,
71 bottom=amphibious,
72 main={armoured}]},
73 /chit/left={chit/identifier={Mine}},
74 /chit/factors={chit/2 factors={2,4}}}}
75 \tikzset{
76 fort/.style={/chit/full={[scale=.625]hex/fortress 2}}}
77 % \end{macrocode}
78 % \iffalse
79 %</testchits>
80 % \fi