diff --git a/pic/2048merge1.tikz b/pic/2048merge1.tikz new file mode 100644 index 0000000..cebd9a6 --- /dev/null +++ b/pic/2048merge1.tikz @@ -0,0 +1,54 @@ +\begin{tikzpicture}[scale=0.75,transform shape] + % Draw the grid + \foreach \i in {0,...,3} { + \foreach \j in {0,...,3} { + \draw[fill=gray!20] (\i,\j) rectangle ++(1,1); + } + } + + % Draw the tiles with numbers + \foreach \i/\j/\n/\color in {0/0/2/20, 1/1/4/40, 2/2/8/60, 3/3/16/80, 2/3/16/80} { + \draw[fill=orange!\color] (\i,\j) rectangle ++(1,1); + \node at (\i+0.5,\j+0.5) {\textbf{\n}}; + } + + \begin{scope}[xshift=6cm] + \foreach \i in {0,...,3} { + \foreach \j in {0,...,3} { + \draw[fill=gray!20] (\i,\j) rectangle ++(1,1); + } + } + + % Draw the tiles with numbers + \foreach \i/\j/\n\color in {3/0/2/20, 3/1/4/40, 3/2/8/60, 3/3/32/100} { + \draw[fill=orange!\color] (\i,\j) rectangle ++(1,1); + \node at (\i+0.5,\j+0.5) {\textbf{\n}}; + } + \end{scope} + + \begin{scope}[xshift=12cm] + \foreach \i in {0,...,3} { + \foreach \j in {0,...,3} { + \draw[fill=gray!20] (\i,\j) rectangle ++(1,1); + } + } + + % Draw the tiles with numbers + \foreach \i/\j/\n/\color in {3/0/2/20, 3/1/4/40, 3/2/8/60, 3/3/32/100,1/0/2/20} { + \draw[fill=orange!\color] (\i,\j) rectangle ++(1,1); + \node at (\i+0.5,\j+0.5) {\textbf{\n}}; + } + \end{scope} + + \draw[thick, black,->] (2,4) -- (2,5) -- (8,5) -- (8,4) ; + \draw[thick, black,->] (8,0) -- (8,-1) -- (14,-1) -- (14,0) ; + + \node at (5,4.5) {$r=32$}; + \node at (11.5,-0.5) {random tile}; + + \node at (-0.5,2) {$B_1=$}; + \node at (5.5,2) {$B_1^{'} =$}; + \node at (11.5,2) {$B_2=$}; + +\end{tikzpicture} + diff --git a/pic/2048merge2.tikz b/pic/2048merge2.tikz new file mode 100644 index 0000000..a978a77 --- /dev/null +++ b/pic/2048merge2.tikz @@ -0,0 +1,53 @@ +\begin{tikzpicture}[scale=0.75,transform shape] + % Draw the grid + \foreach \i in {0,...,3} { + \foreach \j in {0,...,3} { + \draw[fill=gray!20] (\i,\j) rectangle ++(1,1); + } + } + + % Draw the tiles with numbers + \foreach \i/\j/\n/\color in {0/0/2/20, 1/1/4/40, 2/2/8/60, 2/3/16/80, 3/3/32/100} { + \draw[fill=orange!\color] (\i,\j) rectangle ++(1,1); + \node at (\i+0.5,\j+0.5) {\textbf{\n}}; + } + + \begin{scope}[xshift=6cm] + \foreach \i in {0,...,3} { + \foreach \j in {0,...,3} { + \draw[fill=gray!20] (\i,\j) rectangle ++(1,1); + } + } + + % Draw the tiles with numbers + \foreach \i/\j/\n\color in {3/0/2/20, 3/1/4/40, 3/2/8/60, 2/3/16/80,3/3/32/100} { + \draw[fill=orange!\color] (\i,\j) rectangle ++(1,1); + \node at (\i+0.5,\j+0.5) {\textbf{\n}}; + } + \end{scope} + + \begin{scope}[xshift=12cm] + \foreach \i in {0,...,3} { + \foreach \j in {0,...,3} { + \draw[fill=gray!20] (\i,\j) rectangle ++(1,1); + } + } + + % Draw the tiles with numbers + \foreach \i/\j/\n/\color in {3/0/2/20, 3/1/4/40, 3/2/8/60, 3/3/32/100,1/0/2/20,2/3/16/80} { + \draw[fill=orange!\color] (\i,\j) rectangle ++(1,1); + \node at (\i+0.5,\j+0.5) {\textbf{\n}}; + } + \end{scope} + + \draw[thick, black,->] (2,4) -- (2,5) -- (8,5) -- (8,4) ; + \draw[thick, black,->] (8,0) -- (8,-1) -- (14,-1) -- (14,0) ; + + \node at (5,4.5) {$r=0$}; + \node at (11.5,-0.5) {random tile}; + + \node at (-0.5,2) {$B_1=$}; + \node at (5.5,2) {$B_1^{'} =$}; + \node at (11.5,2) {$B_2=$}; + +\end{tikzpicture} \ No newline at end of file