diff options
author | Karl Berry <karl@freefriends.org> | 2023-11-24 21:11:08 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-11-24 21:11:08 +0000 |
commit | b7f98d5069bb9b6936add8eaf2266d9a9dfedde4 (patch) | |
tree | eab94459f0b7f7583b75175f46a5f765954e43bd /Master/texmf-dist/tex/latex | |
parent | a0232a21e40bdec4df0cc9154f041af35c199e27 (diff) |
trivialpursuit (24nov23)
git-svn-id: svn://tug.org/texlive/trunk@68957 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/trivialpursuit/TrivialPursuit.sty | 849 |
1 files changed, 849 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/trivialpursuit/TrivialPursuit.sty b/Master/texmf-dist/tex/latex/trivialpursuit/TrivialPursuit.sty new file mode 100644 index 00000000000..9d12d939a99 --- /dev/null +++ b/Master/texmf-dist/tex/latex/trivialpursuit/TrivialPursuit.sty @@ -0,0 +1,849 @@ +% Author : C. Pierquet +% Copyright : Trivial Pursuit, TradeMark by Hasbro +% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf + + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{TrivialPursuit}[2023/11/23 0.1.0 Present a Trivial Pursuit Board] +% 0.1.0 Initial version + +%====PACKAGES +\RequirePackage{tikz} +\usetikzlibrary{calc,positioning} +\RequirePackage{calc} +\RequirePackage{fontawesome5} +\RequirePackage{simplekv} +\RequirePackage{xintexpr} +\RequirePackage{listofitems} + +%====KEYS [FR] +\defKV[TrivPurs]{% + Rayon=\xdef\triv@purs@rayon{#1},% + HauteurCases=\xdef\triv@purs@hautcases{#1}, + ListeCouleurs=\xdef\triv@purs@liste{#1},% + ListeIcones=\xdef\triv@purs@listeicones{#1},% + CouleurCentre=\xdef\triv@purs@coulcent{#1},% + Unite=\xdef\triv@purs@unit{#1},% + Epaisseur=\xdef\triv@purs@thick{#1},% + Rotation=\xdef\triv@purs@rotate{#1},% + IconeJoker=\xdef\triv@purs@iconjok{#1} +} + +\setKVdefault[TrivPurs]{% + Rayon=8,% + HauteurCases=1.5,% + ListeCouleurs={yellow,orange,blue,brown,green,pink},% + ListeIcones={\faArchway,\faTableTennis,\faUmbrellaBeach,\faGuitar,\faTree,\faMusic},% + Icones=true,% + Centre=true,% + CouleurCentre=lightgray!25,% + Couleurs=true,% + Logo=true,% + Vide=false,% + Unite=1,% + Epaisseur=0.8pt,% + Rotation=0,% + Jokers=true,% + IconeJoker={\faDice} +} + +%====INTERN COMMANDS +\NewDocumentCommand\CreationNoeudsTrivial{}{% + %création des nœuds grand bord petit bord GB-i et PB-i + \foreach \i in {0,1,...,\triv@purs@nbcasesbord}{% + \coordinate (GB-\i) at ({\i*\triv@purs@anglecases}:{\triv@purs@rayon}) ; + \coordinate (PB-\i) at ({\i*\triv@purs@anglecases}:{\triv@purs@rayon-\triv@purs@hautcases}) ; + } + %création des nb*2 nœuds des grands secteurs sous la forme (SA-i) et (SB-i) + \foreach \i in {1,...,\triv@purs@nbcat}{% + \xdef\j{\xinteval{1+(\i-1)*\triv@purs@ecart}}% + \coordinate (SB-\i) at (PB-\j) ;% + } + \coordinate (SA-1) at (PB-\triv@purs@numcasavant) ; + %\filldraw[red] (SA-1) circle[radius=2pt] node[font=\tiny\ttfamily] {SA-1} ; + \foreach \i in {2,...,\triv@purs@nbcat}{% + \xdef\j{\xinteval{-1+(\i-1)*\triv@purs@ecart}}% + \coordinate (SA-\i) at (PB-\j) ; + } + %création des nœuds pour la figure centrale, boucle pour les 1ers + le dernier + \foreach \i in {1,...,\triv@purs@nbcat}{% + \coordinate (OM-\i) at ({30+(\i-1)*60}:{\triv@purs@rayonhexag}) ; + }% + %les nœuds des cases verticales + \foreach \i in {1,...,\triv@purs@nbcat}{% + \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{% + \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}% + \coordinate (D-\i-\j) at ($(SB-\i)!\tmp@coeff!(OM-\i)$) ; + }% + }% + \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%cas C1-... + \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}% + \coordinate (C-1-\j) at ($(SA-1)!\tmp@coeff!(OM-\triv@purs@nbcat)$) ; + }% + \foreach \i in {2,...,\triv@purs@nbcat}{% + \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%cas suivants + \xdef\k{\xinteval{\i-1}} + \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}% + \coordinate (C-\i-\j) at ($(SA-\i)!\tmp@coeff!(OM-\k)$) ; + }% + }% +} +\NewDocumentCommand\RemplirCentreTrivial{ }{%OK + \ifboolKV[TrivPurs]{Couleurs}{\filldraw[\triv@purs@coulcent] (OM-1)--(OM-2)--(OM-3)--(OM-4)--(OM-5)--(OM-6)--cycle ;}{}% +} +\NewDocumentCommand\RemplirCamembertsTrivial{ }{%numéro des camemberts, en partant de la droite + \ifboolKV[TrivPurs]{Couleurs}% + {% + %Couleur du 1er camembert + \filldraw[{\triv@purs@lstcol[1]}] (PB-47)--(GB-47) arc ({-\triv@purs@anglecases}:{\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-1) arc ({\triv@purs@anglecases}:{-\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ; + %Couleur du 2ème + \filldraw[{\triv@purs@lstcol[2]}] (PB-7)--(GB-7) arc ({7*\triv@purs@anglecases}:{9*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-9) arc ({9*\triv@purs@anglecases}:{7*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ; + %Couleur du 3ème + \filldraw[{\triv@purs@lstcol[3]}] (PB-15)--(GB-15) arc ({15*\triv@purs@anglecases}:{17*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-17) arc ({17*\triv@purs@anglecases}:{15*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ; + %Couleur du 4ème + \filldraw[{\triv@purs@lstcol[4]}] (PB-23)--(GB-23) arc ({23*\triv@purs@anglecases}:{25*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-25) arc ({25*\triv@purs@anglecases}:{23*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ; + %Couleur du 5ème + \filldraw[{\triv@purs@lstcol[5]}] (PB-31)--(GB-31) arc ({31*\triv@purs@anglecases}:{33*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-33) arc ({33*\triv@purs@anglecases}:{31*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ; + %Couleur du 6ème + \filldraw[{\triv@purs@lstcol[6]}] (PB-39)--(GB-39) arc ({39*\triv@purs@anglecases}:{41*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-41) arc ({41*\triv@purs@anglecases}:{39*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ; + }% + {}% + %si on affiche les icones + \ifboolKV[TrivPurs]{Icones}% + {% + \node[rotate={90+0*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[1]} ; + \node[rotate={90+8*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({8*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[2]} ; + \node[rotate={90+16*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({16*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[3]} ; + \node[rotate={90+24*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({24*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[4]} ; + \node[rotate={90+32*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({32*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[5]} ; + \node[rotate={90+40*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({40*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[6]} ; + }% + {}% +} +\NewDocumentCommand\RemplirCaseTrivial{ m m m }{%deb + fin + numcouleur + \ifboolKV[TrivPurs]{Couleurs}% + {% + \filldraw[{\triv@purs@lstcol[#3]}] (PB-#1)--(GB-#1) arc ({#1*\triv@purs@anglecases}:{#2*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-#2) arc ({#2*\triv@purs@anglecases}:{#1*\triv@purs@anglecases}:{\triv@purs@rayonint}); + }% + {}% + \ifboolKV[TrivPurs]{Icones}% + {% + \xdef\tmp@aa{\xintfloateval{(#1+0.5)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({\tmp@aa}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[#3]} ; + }% + {}% +} +\NewDocumentCommand\RemplirCaseVertical{ m m m }{%niv + num + numcouleur + \ifboolKV[TrivPurs]{Couleurs}% + {% + \xdef\tmpnivav{\xinteval{#1-1}}% + \xdef\tmpnivap{\xinteval{#1+1}}% + \xdef\tmpcase{\xinteval{#2-1}}% + \xdef\tmpcaseap{\xinteval{#2+1}}% + \xintifboolexpr{#2 > 1 'and' #2 < 5}% + {% + \filldraw[{\triv@purs@lstcol[#3]}] (C-#1-\tmpcase)--(D-#1-\tmpcase)--(D-#1-#2)--(C-#1-#2)--cycle ; + }% + {}% + \xintifboolexpr{#2 == 5}% + {% + \xintifboolexpr{#1 == 1}% + {% + \filldraw[{\triv@purs@lstcol[#3]}] (C-#1-\tmpcase)--(D-#1-\tmpcase)--(OM-#1)--(OM-6)--cycle ; + }% + {% + \filldraw[{\triv@purs@lstcol[#3]}] (C-#1-\tmpcase)--(D-#1-\tmpcase)--(OM-#1)--(OM-\tmpnivav)--cycle ; + }% + }% + {}% + \xintifboolexpr{#2 == 1}% + {% + \xintifboolexpr{#1 == 1}% + {% + \filldraw[{\triv@purs@lstcol[#3]}] (C-1-1)--(PB-\triv@purs@numcasavant) arc({-\triv@purs@anglecases}:{\triv@purs@anglecases}:{\triv@purs@rayonint}) --(D-1-1)--cycle ; + }% + {% + \xdef\tmp@ii{\xinteval{(-1+8*(#1-1))}}% + \xdef\tmp@jj{\xinteval{(\tmp@ii+2)}}% + \filldraw[{\triv@purs@lstcol[#3]}] (C-#1-1)--(PB-\tmp@ii) arc({\tmp@ii*\triv@purs@anglecases}:{\tmp@jj*\triv@purs@anglecases}:{\triv@purs@rayonint}) --(D-#1-1)--cycle ; + }% + }% + {}% + }% + {}% +} +\NewDocumentCommand\LogoCasesVerticalesTrivial{}{% + \ifboolKV[TrivPurs]{Icones}% + {% + %1er niveau (droite) + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-6)!0.5!(D-1-4)$) {\triv@purs@lsticons[2]} ; + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-1-4)!0.5!(D-1-3)$) {\triv@purs@lsticons[6]} ; + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-1-3)!0.5!(D-1-2)$) {\triv@purs@lsticons[5]} ; + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-1-2)!0.5!(D-1-1)$) {\triv@purs@lsticons[3]} ; + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-1-1)!0.5!(SB-1)$) {\triv@purs@lsticons[4]} ; + %2eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(8)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-1)!0.5!(D-2-4)$) {\triv@purs@lsticons[3]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-2-4)!0.5!(D-2-3)$) {\triv@purs@lsticons[1]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-2-3)!0.5!(D-2-2)$) {\triv@purs@lsticons[6]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-2-2)!0.5!(D-2-1)$) {\triv@purs@lsticons[4]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-2-1)!0.5!(SB-2)$) {\triv@purs@lsticons[5]} ; + %3eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(16)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-2)!0.5!(D-3-4)$) {\triv@purs@lsticons[4]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-3-4)!0.5!(D-3-3)$) {\triv@purs@lsticons[2]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-3-3)!0.5!(D-3-2)$) {\triv@purs@lsticons[1]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-3-2)!0.5!(D-3-1)$) {\triv@purs@lsticons[5]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-3-1)!0.5!(SB-3)$) {\triv@purs@lsticons[6]} ; + %4eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(24)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-3)!0.5!(D-4-4)$) {\triv@purs@lsticons[5]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-4-4)!0.5!(D-4-3)$) {\triv@purs@lsticons[3]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-4-3)!0.5!(D-4-2)$) {\triv@purs@lsticons[2]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-4-2)!0.5!(D-4-1)$) {\triv@purs@lsticons[6]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-4-1)!0.5!(SB-4)$) {\triv@purs@lsticons[1]} ; + %5eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(32)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-4)!0.5!(D-5-4)$) {\triv@purs@lsticons[6]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-5-4)!0.5!(D-5-3)$) {\triv@purs@lsticons[4]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-5-3)!0.5!(D-5-2)$) {\triv@purs@lsticons[3]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-5-2)!0.5!(D-5-1)$) {\triv@purs@lsticons[1]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-5-1)!0.5!(SB-5)$) {\triv@purs@lsticons[2]} ; + %6eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(40)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-5)!0.5!(D-6-4)$) {\triv@purs@lsticons[1]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-6-4)!0.5!(D-6-3)$) {\triv@purs@lsticons[5]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-6-3)!0.5!(D-6-2)$) {\triv@purs@lsticons[4]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-6-2)!0.5!(D-6-1)$) {\triv@purs@lsticons[2]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-6-1)!0.5!(SB-6)$) {\triv@purs@lsticons[3]} ; + }% + {}% +} + +\NewDocumentCommand\RemplirCasesTour{}{% + %niveau 1 vertical + \RemplirCaseVertical{1}{1}{4}\RemplirCaseVertical{2}{1}{5}\RemplirCaseVertical{3}{1}{6} + \RemplirCaseVertical{4}{1}{1}\RemplirCaseVertical{5}{1}{2}\RemplirCaseVertical{6}{1}{3} + %secteur1 + \RemplirCaseTrivial{1}{2}{4}\RemplirCaseTrivial{3}{4}{3}\RemplirCaseTrivial{4}{5}{6}\RemplirCaseTrivial{6}{7}{5} + %secteur2 + \RemplirCaseTrivial{9}{10}{5}\RemplirCaseTrivial{11}{12}{4}\RemplirCaseTrivial{12}{13}{1}\RemplirCaseTrivial{14}{15}{6} + %secteur3 + \RemplirCaseTrivial{17}{18}{6}\RemplirCaseTrivial{19}{20}{5}\RemplirCaseTrivial{20}{21}{2}\RemplirCaseTrivial{22}{23}{1} + %secteur4 + \RemplirCaseTrivial{25}{26}{1}\RemplirCaseTrivial{27}{28}{6}\RemplirCaseTrivial{28}{29}{3}\RemplirCaseTrivial{30}{31}{2} + %secteur5 + \RemplirCaseTrivial{33}{34}{2}\RemplirCaseTrivial{35}{36}{1}\RemplirCaseTrivial{36}{37}{4}\RemplirCaseTrivial{38}{39}{3} + %secteur5 + \RemplirCaseTrivial{41}{42}{3}\RemplirCaseTrivial{43}{44}{2}\RemplirCaseTrivial{44}{45}{5}\RemplirCaseTrivial{46}{47}{4} + %montées à partir des cases n°2 + \RemplirCaseVertical{1}{2}{3}\RemplirCaseVertical{1}{3}{5}\RemplirCaseVertical{1}{4}{6}\RemplirCaseVertical{1}{5}{2} + \RemplirCaseVertical{2}{2}{4}\RemplirCaseVertical{2}{3}{6}\RemplirCaseVertical{2}{4}{1}\RemplirCaseVertical{2}{5}{3} + \RemplirCaseVertical{3}{2}{5}\RemplirCaseVertical{3}{3}{1}\RemplirCaseVertical{3}{4}{2}\RemplirCaseVertical{3}{5}{4} + \RemplirCaseVertical{4}{2}{6}\RemplirCaseVertical{4}{3}{2}\RemplirCaseVertical{4}{4}{3}\RemplirCaseVertical{4}{5}{5} + \RemplirCaseVertical{5}{2}{1}\RemplirCaseVertical{5}{3}{3}\RemplirCaseVertical{5}{4}{4}\RemplirCaseVertical{5}{5}{6} + \RemplirCaseVertical{6}{2}{2}\RemplirCaseVertical{6}{3}{4}\RemplirCaseVertical{6}{4}{5}\RemplirCaseVertical{6}{5}{1} + %les icones + \ifboolKV[TrivPurs]{Icones}% + {% + %1er niveau (droite) + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-6)!0.5!(D-1-4)$) {\triv@purs@lsticons[2]} ; + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-1-4)!0.5!(D-1-3)$) {\triv@purs@lsticons[6]} ; + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-1-3)!0.5!(D-1-2)$) {\triv@purs@lsticons[5]} ; + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-1-2)!0.5!(D-1-1)$) {\triv@purs@lsticons[3]} ; + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-1-1)!0.5!(SB-1)$) {\triv@purs@lsticons[4]} ; + %2eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(8)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-1)!0.5!(D-2-4)$) {\triv@purs@lsticons[3]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-2-4)!0.5!(D-2-3)$) {\triv@purs@lsticons[1]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-2-3)!0.5!(D-2-2)$) {\triv@purs@lsticons[6]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-2-2)!0.5!(D-2-1)$) {\triv@purs@lsticons[4]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-2-1)!0.5!(SB-2)$) {\triv@purs@lsticons[5]} ; + %3eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(16)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-2)!0.5!(D-3-4)$) {\triv@purs@lsticons[4]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-3-4)!0.5!(D-3-3)$) {\triv@purs@lsticons[2]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-3-3)!0.5!(D-3-2)$) {\triv@purs@lsticons[1]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-3-2)!0.5!(D-3-1)$) {\triv@purs@lsticons[5]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-3-1)!0.5!(SB-3)$) {\triv@purs@lsticons[6]} ; + %4eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(24)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-3)!0.5!(D-4-4)$) {\triv@purs@lsticons[5]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-4-4)!0.5!(D-4-3)$) {\triv@purs@lsticons[3]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-4-3)!0.5!(D-4-2)$) {\triv@purs@lsticons[2]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-4-2)!0.5!(D-4-1)$) {\triv@purs@lsticons[6]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-4-1)!0.5!(SB-4)$) {\triv@purs@lsticons[1]} ; + %5eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(32)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-4)!0.5!(D-5-4)$) {\triv@purs@lsticons[6]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-5-4)!0.5!(D-5-3)$) {\triv@purs@lsticons[4]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-5-3)!0.5!(D-5-2)$) {\triv@purs@lsticons[3]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-5-2)!0.5!(D-5-1)$) {\triv@purs@lsticons[1]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-5-1)!0.5!(SB-5)$) {\triv@purs@lsticons[2]} ; + %6eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(40)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-5)!0.5!(D-6-4)$) {\triv@purs@lsticons[1]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-6-4)!0.5!(D-6-3)$) {\triv@purs@lsticons[5]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-6-3)!0.5!(D-6-2)$) {\triv@purs@lsticons[4]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-6-2)!0.5!(D-6-1)$) {\triv@purs@lsticons[2]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-6-1)!0.5!(SB-6)$) {\triv@purs@lsticons[3]} ; + }% + {}% + %les jokers + \ifboolKV[TrivPurs]{Icones}% + {% + \ifboolKV[TrivPurs]{Jokers}% + {% + \foreach \i in {1,...,\triv@purs@nbcat}{% + \xdef\tmp@aa{\xintfloateval{(8*(\i-1)+2+0.5)*\triv@purs@anglecases}}% + \xdef\tmp@ab{\xintfloateval{(8*(\i-1)+5+0.5)*\triv@purs@anglecases}}% + \node[rotate=\tmp@aa,scale={\triv@purs@scaleicons*\triv@purs@hautcases}] at ({(0.5+8*(\i-1)+2)*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@iconjok} ; + \node[rotate=\tmp@ab,scale={\triv@purs@scaleicons*\triv@purs@hautcases}] at ({(0.5+8*(\i-1)+5)*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@iconjok} ; + }% + }% + {}% + }% + {}% +} +\NewDocumentCommand\TraceBorduresTrivial{ }{% + %les tracés des cases + \draw[EpTraits] (0,0) circle[radius=\triv@purs@rayon] ; + \draw[EpTraits] (0,0) circle[radius={\triv@purs@rayon-\triv@purs@hautcases}] ; + \foreach \i in {0,...,\triv@purs@nbcasesbord}{% + \xintifboolexpr{\xintiiRem{\i}{\triv@purs@ecart} == 0}% + {}% + {% + \draw[EpTraits] (PB-\i)--(GB-\i) ; + }% + }% + \draw[EpTraits] (SB-1)--(OM-1)--(OM-\triv@purs@nbcat)--(SA-1) ; + \foreach \i in {2,...,\triv@purs@nbcat}{% + \xdef\j{\xinteval{\i-1}}% + \draw[EpTraits] (SB-\i)--(OM-\i)--(OM-\j)--(SA-\i) ; + }% + \foreach \i in {1,...,\triv@purs@nbcat}{% + \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{% + \draw[EpTraits] (C-\i-\j)--(D-\i-\j) ; + }% + }% +} +\NewDocumentCommand\LogoTrivialPursuit{}{% + \draw[EpTraitsPlusPlus] (0,0) circle[radius=\triv@purs@lgcamemb] ; + \foreach \i in {-30,30,...,270}{\draw[EpTraitsPlusPlus] (0,0)--(\i:{\triv@purs@lgcamemb}) ;} + \begin{scope}[shift={(0:{0.15*\triv@purs@lgcamemb})}] + \ifboolKV[TrivPurs]{Couleurs}% + {% + \filldraw[{\triv@purs@lstcol[1]}] (0,0)--({-30}:{0.765*\triv@purs@lgcamemb}) arc (-30:30:{0.765*\triv@purs@lgcamemb}) -- cycle ; + }% + {}% + \draw[EpTraitsPlus] (0,0)--({-30}:{0.765*\triv@purs@lgcamemb}) arc (-30:30:{0.765*\triv@purs@lgcamemb}) -- cycle ; + \end{scope} + \begin{scope}[shift={(60:{0.15*\triv@purs@lgcamemb})}] + \ifboolKV[TrivPurs]{Couleurs}% + {% + \filldraw[{\triv@purs@lstcol[2]}] (0,0)--({30}:{0.765*\triv@purs@lgcamemb}) arc (30:90:{0.765*\triv@purs@lgcamemb}) -- cycle ; + }% + {}% + \draw[EpTraitsPlus] (0,0)--({30}:{0.765*\triv@purs@lgcamemb}) arc (30:90:{0.765*\triv@purs@lgcamemb}) -- cycle ; + \end{scope} + \begin{scope}[shift={(120:{0.15*\triv@purs@lgcamemb})}] + \ifboolKV[TrivPurs]{Couleurs}% + {% + \filldraw[{\triv@purs@lstcol[3]}] (0,0)--({90}:{0.765*\triv@purs@lgcamemb}) arc (90:150:{0.765*\triv@purs@lgcamemb}) -- cycle ; + }% + {}% + \draw[EpTraitsPlus] (0,0)--({90}:{0.765*\triv@purs@lgcamemb}) arc (90:150:{0.765*\triv@purs@lgcamemb}) -- cycle ; + \end{scope} + \begin{scope}[shift={(180:{0.15*\triv@purs@lgcamemb})}] + \ifboolKV[TrivPurs]{Couleurs}% + {% + \filldraw[{\triv@purs@lstcol[4]}] (0,0)--({150}:{0.765*\triv@purs@lgcamemb}) arc (150:210:{0.765*\triv@purs@lgcamemb}) -- cycle ; + }% + {}% + \draw[EpTraitsPlus] (0,0)--({150}:{0.765*\triv@purs@lgcamemb}) arc (150:210:{0.765*\triv@purs@lgcamemb}) -- cycle ; + \end{scope} + \begin{scope}[shift={(240:{0.15*\triv@purs@lgcamemb})}] + \ifboolKV[TrivPurs]{Couleurs}% + {% + \filldraw[{\triv@purs@lstcol[5]}] (0,0)--({210}:{0.765*\triv@purs@lgcamemb}) arc (210:270:{0.765*\triv@purs@lgcamemb}) -- cycle ; + }% + {}% + \draw[EpTraitsPlus] (0,0)--({210}:{0.765*\triv@purs@lgcamemb}) arc (210:270:{0.765*\triv@purs@lgcamemb}) -- cycle ; + \end{scope} + \begin{scope}[shift={(300:{0.15*\triv@purs@lgcamemb})}] + \ifboolKV[TrivPurs]{Couleurs}% + {% + \filldraw[{\triv@purs@lstcol[6]}] (0,0)--({270}:{0.765*\triv@purs@lgcamemb}) arc (270:330:{0.765*\triv@purs@lgcamemb}) -- cycle ; + }% + {}% + \draw[EpTraitsPlus] (0,0)--({270}:{0.765*\triv@purs@lgcamemb}) arc (270:330:{0.765*\triv@purs@lgcamemb}) -- cycle ; + \end{scope} +} + +%====CREATION +\NewDocumentCommand\PlateauTrivialPursuit{ O{} D<>{} }{% + \restoreKV[TrivPurs]% revenir au valeurs par défaut + \setKV[TrivPurs]{#1}% lit les arguments optionnels + \xdef\triv@purs@nbcat{6}%6 catégories, d'office !! + \readlist*\triv@purs@lstcol{\triv@purs@liste}% + \readlist*\triv@purs@lsticons{\triv@purs@listeicones}% + %calculs utiles + \xdef\triv@purs@scale{\xintfloateval{\triv@purs@unit}}% + \xdef\triv@purs@scaleicons{\xintfloateval{(\triv@purs@rayon/8)}}% + \xdef\triv@purs@rayonint{\xintfloateval{(\triv@purs@rayon-\triv@purs@hautcases)}}% + \xdef\triv@purs@rayonhexag{\xintfloateval{2*\triv@purs@rayonint*sin(Pi/24)}}% + \xdef\triv@purs@nbcasesbord{\xintieval{(\triv@purs@nbcat)**2+2*(\triv@purs@nbcat)}}% + \xdef\triv@purs@numcasavant{\xinteval{\triv@purs@nbcasesbord-1}}% + \xdef\triv@purs@anglesect{\xintfloateval{360/(\triv@purs@nbcat)}}% + \xdef\triv@purs@angletheta{\xintfloateval{90-180/(\triv@purs@nbcat)}}% + \xdef\triv@purs@anglecases{\xintfloateval{360/(\triv@purs@nbcasesbord)}}% + \xdef\triv@purs@ecart{\xinteval{\triv@purs@nbcat+2}}%8 pour 6 catégories + \xdef\triv@purs@lgcamemb{\xintfloateval{2*Pi*\triv@purs@rayon/(\triv@purs@nbcasesbord)}}% + %si vide + \ifboolKV[TrivPurs]{Vide}% + {% + \setKV[TrivPurs]{Couleurs=false,Icones=false,Logo=false} + }% + {}% + %environnement + \begin{tikzpicture}[x=\triv@purs@unit cm,y=\triv@purs@unit cm,every node/.style={scale=\triv@purs@scale,inner sep=0pt},transform shape,#2]% + %style + \tikzset{EpTraits/.style={line width={\triv@purs@unit*\triv@purs@scaleicons*\triv@purs@thick}}} + \tikzset{EpTraitsPlus/.style={line width={1.5*\triv@purs@unit*\triv@purs@scaleicons*\triv@purs@thick}}} + \tikzset{EpTraitsPlusPlus/.style={line width={2*\triv@purs@unit*\triv@purs@scaleicons*\triv@purs@thick}}} + %clip pour la Rotation + \useasboundingbox (0,0) circle[radius={\triv@purs@rayon}] ; + %création + \begin{scope}[rotate=\triv@purs@rotate] + %les nœuds OK + \CreationNoeudsTrivial + %test avec centre OK + \ifboolKV[TrivPurs]{Centre}{\RemplirCentreTrivial}{} + %camemberts OK + \RemplirCamembertsTrivial + %cases OK + \RemplirCasesTour + %bordures + \TraceBorduresTrivial + %logo central + \ifboolKV[TrivPurs]{Logo}{\LogoTrivialPursuit}{} + \end{scope} + \end{tikzpicture}% +} + +%====KEYS [EN] +\defKV[TrivPursEN]{% + Radius=\xdef\triv@purs@rayon{#1},% + BorderHeight=\xdef\triv@purs@hautcases{#1}, + ListColors=\xdef\triv@purs@liste{#1},% + ListIcons=\xdef\triv@purs@listeicones{#1},% + ColorCenter=\xdef\triv@purs@coulcent{#1},% + Unit=\xdef\triv@purs@unit{#1},% + Thickness=\xdef\triv@purs@thick{#1},% + Rotation=\xdef\triv@purs@rotate{#1},% + IconJoker=\xdef\triv@purs@iconjok{#1} +} + +\setKVdefault[TrivPursEN]{% + Radius=8,% + BorderHeight=1.5,% + ListColors={yellow,orange,blue,brown,green,pink},% + ListIcons={\faArchway,\faTableTennis,\faUmbrellaBeach,\faGuitar,\faTree,\faMusic},% + Icons=true,% + Center=true,% + ColorCenter=lightgray!25,% + Colors=true,% + Logo=true,% + Blank=false,% + Unit=1,% + Thickness=0.8pt,% + Rotation=0,% + Jokers=true,% + IconJoker={\faDice} +} + +%====INTERN COMMANDS +\NewDocumentCommand\CreationNodesTrivial{}{% + %création des nœuds grand bord petit bord GB-i et PB-i + \foreach \i in {0,1,...,\triv@purs@nbcasesbord}{% + \coordinate (GB-\i) at ({\i*\triv@purs@anglecases}:{\triv@purs@rayon}) ; + \coordinate (PB-\i) at ({\i*\triv@purs@anglecases}:{\triv@purs@rayon-\triv@purs@hautcases}) ; + } + %création des nb*2 nœuds des grands secteurs sous la forme (SA-i) et (SB-i) + \foreach \i in {1,...,\triv@purs@nbcat}{% + \xdef\j{\xinteval{1+(\i-1)*\triv@purs@ecart}}% + \coordinate (SB-\i) at (PB-\j) ;% + } + \coordinate (SA-1) at (PB-\triv@purs@numcasavant) ; + %\filldraw[red] (SA-1) circle[radius=2pt] node[font=\tiny\ttfamily] {SA-1} ; + \foreach \i in {2,...,\triv@purs@nbcat}{% + \xdef\j{\xinteval{-1+(\i-1)*\triv@purs@ecart}}% + \coordinate (SA-\i) at (PB-\j) ; + } + %création des nœuds pour la figure centrale, boucle pour les 1ers + le dernier + \foreach \i in {1,...,\triv@purs@nbcat}{% + \coordinate (OM-\i) at ({30+(\i-1)*60}:{\triv@purs@rayonhexag}) ; + }% + %les nœuds des cases verticales + \foreach \i in {1,...,\triv@purs@nbcat}{% + \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{% + \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}% + \coordinate (D-\i-\j) at ($(SB-\i)!\tmp@coeff!(OM-\i)$) ; + }% + }% + \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%cas C1-... + \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}% + \coordinate (C-1-\j) at ($(SA-1)!\tmp@coeff!(OM-\triv@purs@nbcat)$) ; + }% + \foreach \i in {2,...,\triv@purs@nbcat}{% + \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{%cas suivants + \xdef\k{\xinteval{\i-1}} + \xdef\tmp@coeff{\xintfloateval{\j/(\triv@purs@nbcat-1)}}% + \coordinate (C-\i-\j) at ($(SA-\i)!\tmp@coeff!(OM-\k)$) ; + }% + }% +} +\NewDocumentCommand\FillCenterTrivial{ }{%OK + \ifboolKV[TrivPursEN]{Colors}{\filldraw[\triv@purs@coulcent] (OM-1)--(OM-2)--(OM-3)--(OM-4)--(OM-5)--(OM-6)--cycle ;}{}% +} +\NewDocumentCommand\FillCamembersTrivial{ }{%numéro des camemberts, en partant de la droite + \ifboolKV[TrivPursEN]{Colors}% + {% + %Couleur du 1er camembert + \filldraw[{\triv@purs@lstcol[1]}] (PB-47)--(GB-47) arc ({-\triv@purs@anglecases}:{\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-1) arc ({\triv@purs@anglecases}:{-\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ; + %Couleur du 2ème + \filldraw[{\triv@purs@lstcol[2]}] (PB-7)--(GB-7) arc ({7*\triv@purs@anglecases}:{9*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-9) arc ({9*\triv@purs@anglecases}:{7*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ; + %Couleur du 3ème + \filldraw[{\triv@purs@lstcol[3]}] (PB-15)--(GB-15) arc ({15*\triv@purs@anglecases}:{17*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-17) arc ({17*\triv@purs@anglecases}:{15*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ; + %Couleur du 4ème + \filldraw[{\triv@purs@lstcol[4]}] (PB-23)--(GB-23) arc ({23*\triv@purs@anglecases}:{25*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-25) arc ({25*\triv@purs@anglecases}:{23*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ; + %Couleur du 5ème + \filldraw[{\triv@purs@lstcol[5]}] (PB-31)--(GB-31) arc ({31*\triv@purs@anglecases}:{33*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-33) arc ({33*\triv@purs@anglecases}:{31*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ; + %Couleur du 6ème + \filldraw[{\triv@purs@lstcol[6]}] (PB-39)--(GB-39) arc ({39*\triv@purs@anglecases}:{41*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-41) arc ({41*\triv@purs@anglecases}:{39*\triv@purs@anglecases}:{\triv@purs@rayonint})--cycle ; + }% + {}% + %si on affiche les icones + \ifboolKV[TrivPursEN]{Icons}% + {% + \node[rotate={90+0*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({0}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[1]} ; + \node[rotate={90+8*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({8*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[2]} ; + \node[rotate={90+16*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({16*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[3]} ; + \node[rotate={90+24*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({24*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[4]} ; + \node[rotate={90+32*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({32*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[5]} ; + \node[rotate={90+40*\triv@purs@anglecases},scale={1.5*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({40*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[6]} ; + }% + {}% +} +\NewDocumentCommand\FillCellTrivial{ m m m }{%deb + fin + numcouleur + \ifboolKV[TrivPursEN]{Colors}% + {% + \filldraw[{\triv@purs@lstcol[#3]}] (PB-#1)--(GB-#1) arc ({#1*\triv@purs@anglecases}:{#2*\triv@purs@anglecases}:{\triv@purs@rayon})--(PB-#2) arc ({#2*\triv@purs@anglecases}:{#1*\triv@purs@anglecases}:{\triv@purs@rayonint}); + }% + {}% + \ifboolKV[TrivPursEN]{Icons}% + {% + \xdef\tmp@aa{\xintfloateval{(#1+0.5)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ({\tmp@aa}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@lsticons[#3]} ; + }% + {}% +} +\NewDocumentCommand\FillCellVertical{ m m m }{%niv + num + numcouleur + \ifboolKV[TrivPursEN]{Colors}% + {% + \xdef\tmpnivav{\xinteval{#1-1}}% + \xdef\tmpnivap{\xinteval{#1+1}}% + \xdef\tmpcase{\xinteval{#2-1}}% + \xdef\tmpcaseap{\xinteval{#2+1}}% + \xintifboolexpr{#2 > 1 'and' #2 < 5}% + {% + \filldraw[{\triv@purs@lstcol[#3]}] (C-#1-\tmpcase)--(D-#1-\tmpcase)--(D-#1-#2)--(C-#1-#2)--cycle ; + }% + {}% + \xintifboolexpr{#2 == 5}% + {% + \xintifboolexpr{#1 == 1}% + {% + \filldraw[{\triv@purs@lstcol[#3]}] (C-#1-\tmpcase)--(D-#1-\tmpcase)--(OM-#1)--(OM-6)--cycle ; + }% + {% + \filldraw[{\triv@purs@lstcol[#3]}] (C-#1-\tmpcase)--(D-#1-\tmpcase)--(OM-#1)--(OM-\tmpnivav)--cycle ; + }% + }% + {}% + \xintifboolexpr{#2 == 1}% + {% + \xintifboolexpr{#1 == 1}% + {% + \filldraw[{\triv@purs@lstcol[#3]}] (C-1-1)--(PB-\triv@purs@numcasavant) arc({-\triv@purs@anglecases}:{\triv@purs@anglecases}:{\triv@purs@rayonint}) --(D-1-1)--cycle ; + }% + {% + \xdef\tmp@ii{\xinteval{(-1+8*(#1-1))}}% + \xdef\tmp@jj{\xinteval{(\tmp@ii+2)}}% + \filldraw[{\triv@purs@lstcol[#3]}] (C-#1-1)--(PB-\tmp@ii) arc({\tmp@ii*\triv@purs@anglecases}:{\tmp@jj*\triv@purs@anglecases}:{\triv@purs@rayonint}) --(D-#1-1)--cycle ; + }% + }% + {}% + }% + {}% +} +\NewDocumentCommand\LogoCellsVerticalTrivial{}{% + \ifboolKV[TrivPursEN]{Icons}% + {% + %1er niveau (droite) + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-6)!0.5!(D-1-4)$) {\triv@purs@lsticons[2]} ; + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-1-4)!0.5!(D-1-3)$) {\triv@purs@lsticons[6]} ; + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-1-3)!0.5!(D-1-2)$) {\triv@purs@lsticons[5]} ; + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-1-2)!0.5!(D-1-1)$) {\triv@purs@lsticons[3]} ; + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-1-1)!0.5!(SB-1)$) {\triv@purs@lsticons[4]} ; + %2eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(8)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-1)!0.5!(D-2-4)$) {\triv@purs@lsticons[3]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-2-4)!0.5!(D-2-3)$) {\triv@purs@lsticons[1]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-2-3)!0.5!(D-2-2)$) {\triv@purs@lsticons[6]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-2-2)!0.5!(D-2-1)$) {\triv@purs@lsticons[4]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-2-1)!0.5!(SB-2)$) {\triv@purs@lsticons[5]} ; + %3eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(16)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-2)!0.5!(D-3-4)$) {\triv@purs@lsticons[4]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-3-4)!0.5!(D-3-3)$) {\triv@purs@lsticons[2]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-3-3)!0.5!(D-3-2)$) {\triv@purs@lsticons[1]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-3-2)!0.5!(D-3-1)$) {\triv@purs@lsticons[5]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-3-1)!0.5!(SB-3)$) {\triv@purs@lsticons[6]} ; + %4eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(24)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-3)!0.5!(D-4-4)$) {\triv@purs@lsticons[5]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-4-4)!0.5!(D-4-3)$) {\triv@purs@lsticons[3]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-4-3)!0.5!(D-4-2)$) {\triv@purs@lsticons[2]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-4-2)!0.5!(D-4-1)$) {\triv@purs@lsticons[6]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-4-1)!0.5!(SB-4)$) {\triv@purs@lsticons[1]} ; + %5eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(32)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-4)!0.5!(D-5-4)$) {\triv@purs@lsticons[6]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-5-4)!0.5!(D-5-3)$) {\triv@purs@lsticons[4]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-5-3)!0.5!(D-5-2)$) {\triv@purs@lsticons[3]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-5-2)!0.5!(D-5-1)$) {\triv@purs@lsticons[1]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-5-1)!0.5!(SB-5)$) {\triv@purs@lsticons[2]} ; + %6eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(40)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-5)!0.5!(D-6-4)$) {\triv@purs@lsticons[1]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-6-4)!0.5!(D-6-3)$) {\triv@purs@lsticons[5]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-6-3)!0.5!(D-6-2)$) {\triv@purs@lsticons[4]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-6-2)!0.5!(D-6-1)$) {\triv@purs@lsticons[2]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-6-1)!0.5!(SB-6)$) {\triv@purs@lsticons[3]} ; + }% + {}% +} + +\NewDocumentCommand\FillCellsBorder{}{% + %niveau 1 vertical + \FillCellVertical{1}{1}{4}\FillCellVertical{2}{1}{5}\FillCellVertical{3}{1}{6} + \FillCellVertical{4}{1}{1}\FillCellVertical{5}{1}{2}\FillCellVertical{6}{1}{3} + %secteur1 + \FillCellTrivial{1}{2}{4}\FillCellTrivial{3}{4}{3}\FillCellTrivial{4}{5}{6}\FillCellTrivial{6}{7}{5} + %secteur2 + \FillCellTrivial{9}{10}{5}\FillCellTrivial{11}{12}{4}\FillCellTrivial{12}{13}{1}\FillCellTrivial{14}{15}{6} + %secteur3 + \FillCellTrivial{17}{18}{6}\FillCellTrivial{19}{20}{5}\FillCellTrivial{20}{21}{2}\FillCellTrivial{22}{23}{1} + %secteur4 + \FillCellTrivial{25}{26}{1}\FillCellTrivial{27}{28}{6}\FillCellTrivial{28}{29}{3}\FillCellTrivial{30}{31}{2} + %secteur5 + \FillCellTrivial{33}{34}{2}\FillCellTrivial{35}{36}{1}\FillCellTrivial{36}{37}{4}\FillCellTrivial{38}{39}{3} + %secteur5 + \FillCellTrivial{41}{42}{3}\FillCellTrivial{43}{44}{2}\FillCellTrivial{44}{45}{5}\FillCellTrivial{46}{47}{4} + %montées à partir des cases n°2 + \FillCellVertical{1}{2}{3}\FillCellVertical{1}{3}{5}\FillCellVertical{1}{4}{6}\FillCellVertical{1}{5}{2} + \FillCellVertical{2}{2}{4}\FillCellVertical{2}{3}{6}\FillCellVertical{2}{4}{1}\FillCellVertical{2}{5}{3} + \FillCellVertical{3}{2}{5}\FillCellVertical{3}{3}{1}\FillCellVertical{3}{4}{2}\FillCellVertical{3}{5}{4} + \FillCellVertical{4}{2}{6}\FillCellVertical{4}{3}{2}\FillCellVertical{4}{4}{3}\FillCellVertical{4}{5}{5} + \FillCellVertical{5}{2}{1}\FillCellVertical{5}{3}{3}\FillCellVertical{5}{4}{4}\FillCellVertical{5}{5}{6} + \FillCellVertical{6}{2}{2}\FillCellVertical{6}{3}{4}\FillCellVertical{6}{4}{5}\FillCellVertical{6}{5}{1} + %les icones + \ifboolKV[TrivPursEN]{Icons}% + {% + %1er niveau (droite) + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-6)!0.5!(D-1-4)$) {\triv@purs@lsticons[2]} ; + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-1-4)!0.5!(D-1-3)$) {\triv@purs@lsticons[6]} ; + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-1-3)!0.5!(D-1-2)$) {\triv@purs@lsticons[5]} ; + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-1-2)!0.5!(D-1-1)$) {\triv@purs@lsticons[3]} ; + \node[rotate={90},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-1-1)!0.5!(SB-1)$) {\triv@purs@lsticons[4]} ; + %2eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(8)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-1)!0.5!(D-2-4)$) {\triv@purs@lsticons[3]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-2-4)!0.5!(D-2-3)$) {\triv@purs@lsticons[1]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-2-3)!0.5!(D-2-2)$) {\triv@purs@lsticons[6]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-2-2)!0.5!(D-2-1)$) {\triv@purs@lsticons[4]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-2-1)!0.5!(SB-2)$) {\triv@purs@lsticons[5]} ; + %3eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(16)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-2)!0.5!(D-3-4)$) {\triv@purs@lsticons[4]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-3-4)!0.5!(D-3-3)$) {\triv@purs@lsticons[2]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-3-3)!0.5!(D-3-2)$) {\triv@purs@lsticons[1]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-3-2)!0.5!(D-3-1)$) {\triv@purs@lsticons[5]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-3-1)!0.5!(SB-3)$) {\triv@purs@lsticons[6]} ; + %4eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(24)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-3)!0.5!(D-4-4)$) {\triv@purs@lsticons[5]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-4-4)!0.5!(D-4-3)$) {\triv@purs@lsticons[3]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-4-3)!0.5!(D-4-2)$) {\triv@purs@lsticons[2]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-4-2)!0.5!(D-4-1)$) {\triv@purs@lsticons[6]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-4-1)!0.5!(SB-4)$) {\triv@purs@lsticons[1]} ; + %5eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(32)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-4)!0.5!(D-5-4)$) {\triv@purs@lsticons[6]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-5-4)!0.5!(D-5-3)$) {\triv@purs@lsticons[4]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-5-3)!0.5!(D-5-2)$) {\triv@purs@lsticons[3]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-5-2)!0.5!(D-5-1)$) {\triv@purs@lsticons[1]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-5-1)!0.5!(SB-5)$) {\triv@purs@lsticons[2]} ; + %6eme niveau (droite) + \xdef\tmp@aa{\xintfloateval{(40)*\triv@purs@anglecases}} + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(OM-5)!0.5!(D-6-4)$) {\triv@purs@lsticons[1]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-6-4)!0.5!(D-6-3)$) {\triv@purs@lsticons[5]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-6-3)!0.5!(D-6-2)$) {\triv@purs@lsticons[4]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-6-2)!0.5!(D-6-1)$) {\triv@purs@lsticons[2]} ; + \node[rotate={90+\tmp@aa},scale={0.75*\triv@purs@scaleicons*\triv@purs@hautcases},anchor=center] at ($(C-6-1)!0.5!(SB-6)$) {\triv@purs@lsticons[3]} ; + }% + {}% + %les jokers + \ifboolKV[TrivPursEN]{Icons}% + {% + \ifboolKV[TrivPursEN]{Jokers}% + {% + \foreach \i in {1,...,\triv@purs@nbcat}{% + \xdef\tmp@aa{\xintfloateval{(8*(\i-1)+2+0.5)*\triv@purs@anglecases}}% + \xdef\tmp@ab{\xintfloateval{(8*(\i-1)+5+0.5)*\triv@purs@anglecases}}% + \node[rotate=\tmp@aa,scale={\triv@purs@scaleicons*\triv@purs@hautcases}] at ({(0.5+8*(\i-1)+2)*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@iconjok} ; + \node[rotate=\tmp@ab,scale={\triv@purs@scaleicons*\triv@purs@hautcases}] at ({(0.5+8*(\i-1)+5)*\triv@purs@anglecases}:{\triv@purs@rayon-0.5*\triv@purs@hautcases}) {\triv@purs@iconjok} ; + }% + }% + {}% + }% + {}% +} +\NewDocumentCommand\DrawBordersTrivial{ }{% + %les tracés des cases + \draw[EpTraits] (0,0) circle[radius=\triv@purs@rayon] ; + \draw[EpTraits] (0,0) circle[radius={\triv@purs@rayon-\triv@purs@hautcases}] ; + \foreach \i in {0,...,\triv@purs@nbcasesbord}{% + \xintifboolexpr{\xintiiRem{\i}{\triv@purs@ecart} == 0}% + {}% + {% + \draw[EpTraits] (PB-\i)--(GB-\i) ; + }% + }% + \draw[EpTraits] (SB-1)--(OM-1)--(OM-\triv@purs@nbcat)--(SA-1) ; + \foreach \i in {2,...,\triv@purs@nbcat}{% + \xdef\j{\xinteval{\i-1}}% + \draw[EpTraits] (SB-\i)--(OM-\i)--(OM-\j)--(SA-\i) ; + }% + \foreach \i in {1,...,\triv@purs@nbcat}{% + \foreach \j in {1,...,\xinteval{\triv@purs@nbcat-2}}{% + \draw[EpTraits] (C-\i-\j)--(D-\i-\j) ; + }% + }% +} +\NewDocumentCommand\LogoCenterTrivialPursuit{}{% + \draw[EpTraitsPlusPlus] (0,0) circle[radius=\triv@purs@lgcamemb] ; + \foreach \i in {-30,30,...,270}{\draw[EpTraitsPlusPlus] (0,0)--(\i:{\triv@purs@lgcamemb}) ;} + \begin{scope}[shift={(0:{0.15*\triv@purs@lgcamemb})}] + \ifboolKV[TrivPursEN]{Colors}% + {% + \filldraw[{\triv@purs@lstcol[1]}] (0,0)--({-30}:{0.765*\triv@purs@lgcamemb}) arc (-30:30:{0.765*\triv@purs@lgcamemb}) -- cycle ; + }% + {}% + \draw[EpTraitsPlus] (0,0)--({-30}:{0.765*\triv@purs@lgcamemb}) arc (-30:30:{0.765*\triv@purs@lgcamemb}) -- cycle ; + \end{scope} + \begin{scope}[shift={(60:{0.15*\triv@purs@lgcamemb})}] + \ifboolKV[TrivPursEN]{Colors}% + {% + \filldraw[{\triv@purs@lstcol[2]}] (0,0)--({30}:{0.765*\triv@purs@lgcamemb}) arc (30:90:{0.765*\triv@purs@lgcamemb}) -- cycle ; + }% + {}% + \draw[EpTraitsPlus] (0,0)--({30}:{0.765*\triv@purs@lgcamemb}) arc (30:90:{0.765*\triv@purs@lgcamemb}) -- cycle ; + \end{scope} + \begin{scope}[shift={(120:{0.15*\triv@purs@lgcamemb})}] + \ifboolKV[TrivPursEN]{Colors}% + {% + \filldraw[{\triv@purs@lstcol[3]}] (0,0)--({90}:{0.765*\triv@purs@lgcamemb}) arc (90:150:{0.765*\triv@purs@lgcamemb}) -- cycle ; + }% + {}% + \draw[EpTraitsPlus] (0,0)--({90}:{0.765*\triv@purs@lgcamemb}) arc (90:150:{0.765*\triv@purs@lgcamemb}) -- cycle ; + \end{scope} + \begin{scope}[shift={(180:{0.15*\triv@purs@lgcamemb})}] + \ifboolKV[TrivPursEN]{Colors}% + {% + \filldraw[{\triv@purs@lstcol[4]}] (0,0)--({150}:{0.765*\triv@purs@lgcamemb}) arc (150:210:{0.765*\triv@purs@lgcamemb}) -- cycle ; + }% + {}% + \draw[EpTraitsPlus] (0,0)--({150}:{0.765*\triv@purs@lgcamemb}) arc (150:210:{0.765*\triv@purs@lgcamemb}) -- cycle ; + \end{scope} + \begin{scope}[shift={(240:{0.15*\triv@purs@lgcamemb})}] + \ifboolKV[TrivPursEN]{Colors}% + {% + \filldraw[{\triv@purs@lstcol[5]}] (0,0)--({210}:{0.765*\triv@purs@lgcamemb}) arc (210:270:{0.765*\triv@purs@lgcamemb}) -- cycle ; + }% + {}% + \draw[EpTraitsPlus] (0,0)--({210}:{0.765*\triv@purs@lgcamemb}) arc (210:270:{0.765*\triv@purs@lgcamemb}) -- cycle ; + \end{scope} + \begin{scope}[shift={(300:{0.15*\triv@purs@lgcamemb})}] + \ifboolKV[TrivPursEN]{Colors}% + {% + \filldraw[{\triv@purs@lstcol[6]}] (0,0)--({270}:{0.765*\triv@purs@lgcamemb}) arc (270:330:{0.765*\triv@purs@lgcamemb}) -- cycle ; + }% + {}% + \draw[EpTraitsPlus] (0,0)--({270}:{0.765*\triv@purs@lgcamemb}) arc (270:330:{0.765*\triv@purs@lgcamemb}) -- cycle ; + \end{scope} +} + +%====CREATION +\NewDocumentCommand\BoardTrivialPursuit{ O{} D<>{} }{% + \restoreKV[TrivPursEN]% revenir au valeurs par défaut + \setKV[TrivPursEN]{#1}% lit les arguments optionnels + \xdef\triv@purs@nbcat{6}%6 catégories, d'office !! + \readlist*\triv@purs@lstcol{\triv@purs@liste}% + \readlist*\triv@purs@lsticons{\triv@purs@listeicones}% + %calculs utiles + \xdef\triv@purs@scale{\xintfloateval{\triv@purs@unit}}% + \xdef\triv@purs@scaleicons{\xintfloateval{(\triv@purs@rayon/8)}}% + \xdef\triv@purs@rayonint{\xintfloateval{(\triv@purs@rayon-\triv@purs@hautcases)}}% + \xdef\triv@purs@rayonhexag{\xintfloateval{2*\triv@purs@rayonint*sin(Pi/24)}}% + \xdef\triv@purs@nbcasesbord{\xintieval{(\triv@purs@nbcat)**2+2*(\triv@purs@nbcat)}}% + \xdef\triv@purs@numcasavant{\xinteval{\triv@purs@nbcasesbord-1}}% + \xdef\triv@purs@anglesect{\xintfloateval{360/(\triv@purs@nbcat)}}% + \xdef\triv@purs@angletheta{\xintfloateval{90-180/(\triv@purs@nbcat)}}% + \xdef\triv@purs@anglecases{\xintfloateval{360/(\triv@purs@nbcasesbord)}}% + \xdef\triv@purs@ecart{\xinteval{\triv@purs@nbcat+2}}%8 pour 6 catégories + \xdef\triv@purs@lgcamemb{\xintfloateval{2*Pi*\triv@purs@rayon/(\triv@purs@nbcasesbord)}}% + %si vide + \ifboolKV[TrivPursEN]{Blank}% + {% + \setKV[TrivPursEN]{Colors=false,Icons=false,Logo=false} + }% + {}% + %environnement + \begin{tikzpicture}[x=\triv@purs@unit cm,y=\triv@purs@unit cm,every node/.style={scale=\triv@purs@scale,inner sep=0pt},transform shape,#2]% + %style + \tikzset{EpTraits/.style={line width={\triv@purs@scaleicons*\triv@purs@unit*\triv@purs@thick}}} + \tikzset{EpTraitsPlus/.style={line width={1.5*\triv@purs@scaleicons*\triv@purs@unit*\triv@purs@thick}}} + \tikzset{EpTraitsPlusPlus/.style={line width={2*\triv@purs@scaleicons*\triv@purs@unit*\triv@purs@thick}}} + %clip pour la Rotation + \useasboundingbox (0,0) circle[radius={\triv@purs@rayon}] ; + %création + \begin{scope}[rotate=\triv@purs@rotate] + %les nœuds OK + \CreationNodesTrivial + %test avec centre OK + \ifboolKV[TrivPursEN]{Center}{\FillCenterTrivial}{} + %camemberts OK + \FillCamembersTrivial + %cases OK + \FillCellsBorder + %bordures + \DrawBordersTrivial + %logo central + \ifboolKV[TrivPursEN]{Logo}{\LogoCenterTrivialPursuit}{} + \end{scope} + \end{tikzpicture}% +} + +\endinput
\ No newline at end of file |