feat: game level logic

This commit is contained in:
Krzysztof Rudnicki 2023-09-04 01:15:49 +02:00
parent b1abc98a9d
commit 917ae7e86d
2 changed files with 4 additions and 19 deletions

View File

@ -1615,7 +1615,7 @@ To simplify finding matches first game objects tiles is transformed into vector
\centering
\begin{tikzpicture}[node distance=2cm]
\useasboundingbox (-5,0) rectangle (5, -9); % Set a custom bounding box
\node (start) [startstop] {Find matches};
\node (start) [startstop] {Finding matches logic};
\node (pro1) [process, below of=start] {Convert to ids vector};
\draw [arrow] (start) -- (pro1);
\node (pro2) [process, below of=pro1] {Convert to rows and columns ids vectors};
@ -1635,25 +1635,10 @@ After finding matches, blocks where matches appear are set to be replaced by rep
\paragraph{Replacing blocks}
After setting tiles to be replaced, algorithm goes through blocks with ids equal to -1, checks if there are any blocks above, if yes it replaces the block from above with block from below, if there is no block above, it generates one randomly
\begin{figure}[H]
\begin{figure}[htp]
\centering
\begin{tikzpicture}[node distance=2cm]
\useasboundingbox (-5,0) rectangle (5, -11); % Set a custom bounding box
\node (start) [startstop] {Processing matches};
\node (dec1) [decision, below of=start, yshift=-1cm] {Block id is -1?};
\draw [arrow] (start) -- (dec1);
\node (pro1) [process, below of=dec1] {Replace blocks};
\node (dec2) [decision, below of=pro1, yshift=-2cm] {Blocks above?};
\draw [arrow] (pro1) -- (dec2);
\draw [arrow] (dec2) -- (pro1);
\node (pro2) [process, below of=pro1] {Generate new blocks};
\draw [arrow] (pro1) -- (pro2);
\node (stop) [startstop, below of=pro1] {End processing};
\draw [arrow] (pro2) -- (stop);
\draw [arrow] (pro1) -- (stop);
\end{tikzpicture}
\caption{Finding matches logic}
\label{fig:findingMatches}
\includegraphics{images/processLogicMatches.pdf}
\caption{Logic for processing matches}
\end{figure}
\subsection{Dependency Management}

Binary file not shown.