Last active
November 21, 2018 14:07
-
-
Save puripuri2100/28cf6e2c330c43bb2719d35ab5d14544 to your computer and use it in GitHub Desktop.
puzzle-drawing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\NeedsTeXFormat{LaTeX2e} | |
\ProvidesPackage{demo-puzzle}[2018/09/05 v1.1]%イラロジ対応 | |
\RequirePackage{tikz} | |
\newcommand{\zahyo}[2]{#1,-#2} | |
\newcommand{\@sen}[2]{\draw[very thick](#1) -- (#2);} | |
\newcommand{\sankaku@nuri}[3]{\draw[fill=black] (#1) -- (#2) -- (#3);} | |
\newcommand{\sikaku@nuri}[2]{\draw[fill=black] (#1) rectangle (#2);} | |
\newcommand{\kuro@kazu}[2]{ | |
\draw (#1) node {\Large \textbf{#2}}; | |
} | |
\newcommand{\siro@kazu}[2]{ | |
\draw(#1) node {\Large \textcolor{white}{\textbf{#2}}}; | |
} | |
\newcommand{\@batu}[1]{ | |
\draw (#1) node {$\times$}; | |
} | |
\newcommand{\@ten}[1]{ | |
\draw[fill=black] (#1) circle [radius=.1]; | |
} | |
\newcommand{\@maru}[1]{ | |
\draw (#1) circle [radius=.4]; | |
} | |
\newcommand{\kuro@maru}[1]{ | |
\draw[fill=black] (#1) circle [radius=.4]; | |
} | |
\newcommand{\@yajirusi}[2]{ | |
\draw [->,thick] (#1) -- (#2); | |
} | |
\newcommand{\command@bijutukan}{ | |
\let \sen\@sen | |
\let \nuri\sikaku@nuri | |
\let \kazu\siro@kazu | |
\let \ten\@ten | |
\let \maru\@maru | |
} | |
\newcommand{\command@sudoku}{ | |
\let \kazu\kuro@kazu | |
} | |
\newcommand{\command@sikakunikire}{ | |
\let \sen\@sen | |
\let \kazu\kuro@kazu | |
} | |
\newcommand{\command@syakasyaka}{ | |
\let \toinuri\sikaku@nuri\relax | |
\let \nuri\sankaku@nuri\relax | |
\let \kazu\siro@kazu\relax | |
} | |
\newcommand{\command@yajirin}{ | |
\let \nuri\sikaku@nuri\relax | |
\let \kazu\kuro@kazu\relax | |
\let \ten\@ten | |
\let \sen\@sen | |
\let \yajirusi\@yajirusi | |
} | |
\newcommand{\command@masyu}{ | |
\let \kuromaru\kuro@maru\relax | |
\let \sen\@sen\relax | |
\let \siromaru\@maru\relax | |
} | |
\newcommand{\command@heyawake}{ | |
\let \sen\@sen\relax | |
\let \ten\@ten\relax | |
\let \kurokazu\kuro@kazu\relax | |
\let \sirokazu\siro@kazu\relax | |
\let \nuri\sikaku@nuri\relax | |
} | |
\newcommand{\command@LITS}{ | |
\let \sen\@sen\relax | |
\let \ten\@ten\relax | |
\let \nuri\sikaku@nuri\relax | |
} | |
\newcommand{\command@norinori}{ | |
\let \sen\@sen\relax | |
\let \ten\@ten\relax | |
\let \nuri\sikaku@nuri\relax | |
} | |
\newcommand{\command@nurikabe}{ | |
\let \ten\@ten\relax | |
\let \nuri\sikaku@nuri\relax | |
\let \kazu\kuro@kazu\relax | |
} | |
\newcommand{\command@suririn}{ | |
\let \batu\@batu | |
\let \kazu\kuro@kazu\relax | |
\let \sen\@sen\relax | |
} | |
\newcommand{\command@iraroji}{ | |
\let \nuri\sikaku@nuri\relax | |
\let \kazu\kuro@kazu\relax | |
} | |
\newenvironment{bijutukan}{ | |
\bgroup \command@bijutukan | |
\begin{tikzpicture} | |
\draw[very thick] (0,0) rectangle (5,-5);} | |
{\draw (0,0) grid (5,-5); | |
\end{tikzpicture} \egroup} | |
\newenvironment{sudoku}{ | |
\bgroup \command@sudoku | |
\begin{tikzpicture} | |
\draw[fill=white,very thick,draw=black] (0,0) rectangle (4,-4); | |
\draw[very thick,draw=black] (2,0)--(2,-4); | |
\draw[very thick,draw=black] (0,-2)--(4,-2); | |
\draw[draw=black] (0,0) grid (4,-4); | |
} | |
{\end{tikzpicture} \egroup} | |
\newenvironment{norinori}{ | |
\bgroup \command@norinori | |
\begin{tikzpicture} | |
\draw[fill=white,very thick] (0,0) rectangle (5,-5);} | |
{\draw (0,0) grid (5,-5); | |
\end{tikzpicture} \egroup} | |
\newenvironment{nurikabe}{ | |
\bgroup \command@nurikabe | |
\begin{tikzpicture} | |
\draw[fill=white,very thick] (0,0) rectangle (5,-5);} | |
{\draw (0,0) grid (5,-5); | |
\end{tikzpicture} \egroup} | |
\newenvironment{sikakunikire}{ | |
\bgroup \command@sikakunikire | |
\begin{tikzpicture} | |
\draw[fill=white,very thick] (0,0) rectangle (5,-5);} | |
{\draw[dashed] (0,0) grid (5,-5); | |
\end{tikzpicture} \egroup} | |
\newenvironment{syakasyaka}{ | |
\bgroup \command@syakasyaka | |
\begin{tikzpicture} | |
\draw[fill=white,very thick] (0,0) rectangle (5,-5);} | |
{\draw[dashed] (0,0) grid (5,-5); | |
\end{tikzpicture} \egroup} | |
\newenvironment{yajirin}{ | |
\bgroup \command@yajirin | |
\begin{tikzpicture} | |
\draw[fill=white,very thick] (0,0) rectangle (5,-5);} | |
{\draw[dashed] (0,0) grid (5,-5); | |
\end{tikzpicture} \egroup} | |
\newenvironment{masyu}{ | |
\bgroup \command@masyu | |
\begin{tikzpicture} | |
\draw[fill=white,very thick] (0,0) rectangle (5,-5);} | |
{\draw[dashed] (0,0) grid (5,-5); | |
\end{tikzpicture} \egroup} | |
\newenvironment{heyawake}{ | |
\bgroup \command@heyawake | |
\begin{tikzpicture} | |
\draw[fill=white,very thick] (0,0) rectangle (5,-5);} | |
{\draw[dashed] (0,0) grid (5,-5); | |
\end{tikzpicture} \egroup} | |
\newenvironment{LITS}{ | |
\bgroup \command@LITS | |
\begin{tikzpicture} | |
\draw[fill=white,very thick] (0,0) rectangle (7,-7);} | |
{\draw[dashed] (0,0) grid (7,-7); | |
\end{tikzpicture} \egroup} | |
\newenvironment{suririn}{ | |
\bgroup \command@suririn | |
\begin{tikzpicture} | |
\draw[fill=white,thick,draw=white] (-0.5,0.5) rectangle (5.5,-5.5); | |
\filldraw [black] (0,0) circle (1pt)(0,-1) circle (1pt)(0,-2) circle (1pt)(0,-3) circle (1pt)(0,-4) circle (1pt)(0,-5) circle (1pt) | |
(1,0) circle (1pt)(1,-1) circle (1pt)(1,-2) circle (1pt)(1,-3) circle (1pt)(1,-4) circle (1pt)(1,-5) circle (1pt) | |
(2,0) circle (1pt)(2,-1) circle (1pt)(2,-2) circle (1pt)(2,-3) circle (1pt)(2,-4) circle (1pt)(2,-5) circle (1pt) | |
(3,0) circle (1pt)(3,-1) circle (1pt)(3,-2) circle (1pt)(3,-3) circle (1pt)(3,-4) circle (1pt)(3,-5) circle (1pt) | |
(4,0) circle (1pt)(4,-1) circle (1pt)(4,-2) circle (1pt)(4,-3) circle (1pt)(4,-4) circle (1pt)(4,-5) circle (1pt) | |
(5,0) circle (1pt)(5,-1) circle (1pt)(5,-2) circle (1pt)(5,-3) circle (1pt)(5,-4) circle (1pt)(5,-5) circle (1pt); | |
} | |
{\end{tikzpicture} \egroup} | |
\newenvironment{iraroji}{ | |
\bgroup \command@iraroji | |
\begin{tikzpicture} | |
\draw[fill=white,very thick] (0,0) rectangle (5,-5);} | |
{\draw[dashed] (0,0) grid (5,-5); | |
\end{tikzpicture} \egroup} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment