summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/nimsticks
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/nimsticks')
-rw-r--r--Master/texmf-dist/tex/latex/nimsticks/nimsticks.sty11
1 files changed, 6 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/nimsticks/nimsticks.sty b/Master/texmf-dist/tex/latex/nimsticks/nimsticks.sty
index ae3241b7b24..c00c10004ae 100644
--- a/Master/texmf-dist/tex/latex/nimsticks/nimsticks.sty
+++ b/Master/texmf-dist/tex/latex/nimsticks/nimsticks.sty
@@ -26,9 +26,10 @@
%% SOFTWARE.
%%
-\ProvidesPackage{nimsticks}[2020/07/12 nimsticks 1.0.1]
+\ProvidesPackage{nimsticks}[2020/07/19 nimsticks 1.1]
\RequirePackage[first=-100,last=100,seed=0]{lcg}
\RequirePackage{tikz}
+\RequirePackage{ifthen}
\@ifundefined{drawnimstick}{}
{\PackageWarning{nimsticks}{Command `drawnimstick' already defined}}
\@ifundefined{nimgame}{}
@@ -58,16 +59,16 @@
\draw[very thick] (\topx,0) -- (\botx,0.5);%
\end{tikzpicture}%
}
-\newcommand{\nimgame}[1]{%
- \begin{center}%
- \def\listofgames{#1}%
+\newcommand{\nimgame}[2][block]{%
+ \ifthenelse{\equal{#1}{inline}}{}{\begin{center}}%
+ \def\listofgames{#2}%
\foreach \heap in \listofgames {%
\foreach \heapindex in {1, ..., \heap} {%
\drawnimstick\hspace{0.5mm}%
}%
\hspace{10mm}%
}%
- \end{center}%
+ \ifthenelse{\equal{#1}{inline}}{}{\end{center}}%
}
\endinput
%%