\documentclass[a4paper,12pt]{article}
\usepackage{listings}

\title{ZhenCo FS HolyDesign II \\ Specification}
\date{ December 2, 2070}
\author{Amras}

\begin{document}
	\maketitle
	\newpage
	\section*{Overview}
		The ZhenCo Feng Shui HolyDesign Constructor is a dynamic and responsive standard for the creation of efficient and parametric environments of worship and meditation. The ZhenCo standard is ideal for densely populated regions as well as inhospitable and unmanned extraterrestrial missions.
	\section*{Coloration}
		We utilize eight important colors both to assist automation and to restrict or appease ectoplasmic remnants (coloquially, ghosts).
		\begin{itemize}
			\item White [w]
			\item Red [r]
			\item Orange [o]
			\item Yellow [y]
			\item Green [g]
			\item Blue [b]
			\item Indigo [i]
			\item Violet [v]
		\end{itemize}
		Each ectoplasmic remnant has a color they will avoid at all costs. The ZhenCo proprietary Ectoplasmic Interface tints any remnants with their specific hue to aid users in appropriate design.
	\section*{Command Syntax}
		Each command consists of a \textbf{requirement} and an \textbf{action}. For instance, we may wish to request all \textit{red} tiles turn \textit{blue}. We will use $r$ as the requirement and $b$ as the action \\
\texttt{r -> b    \# turn all red tiles blue}
		\subsection*{Requirement}
		The \textbf{requirement} can contain any of the following symbols: \\
		\begin{tabular}{l | l}
			t, f & respectively true and false. t always satisfies a requirement, f never does. \\
			w,r,o,y,g,b,i,v& check that the tile is of a given color \\
			( )& allow for organization of other statements \\
			!& NOT. Inverts whatever follows. \\
			\&& an AND operator. Conditions on both sides must be met to satisfy. \\
			$|$& an OR operator. Either condition must be met. \\
			$<$, $>$, $=$&coupled with either a digit(0-9) or a letter (A-I) \\
			& is satisfied by all tiles left, right, or on the index specified, respectively.\\
			\%& MODULO, followed by a digit/letter is satisfied by all multiples of the index. \\
			\% $+$& a MODULO expression followed by a $+$ is satisfied by offset multiples. \\
		\end{tabular}

\paragraph{} Some examples: \\
\texttt{
t-> w........\# turn all tiles white \\
f -> g.......\# has no effect \\
r|g -> b.....\# turn all red and green tiles blue \\
(r|g)\&!<B->v \# all red/green tiles not on the left of B turn violet\\
\%C -> i......\# every third column turns indigo \\
\%2+1 -> y....\# turn all odd rows yellow \\
=C\&=2 -> o...\# turn the tile C2 orange 
}
		
		\subsection*{Action}
		The \textbf{action} can contain the following commands: \\
		\begin{tabular}{l | l}
			w,r,o,y,g,b,i,v&color the tiles with the specified color \\
			\$wall&create and dynamically connect a wall in all specified tiles \\
			\$door&create a door in any valid tile, between two walls or doors.\\
			\$open&open any doors in the specified area \\
			\$close&close any doors in the specified area \\
			\&&apply multiple actions seperated by \&
		\end{tabular}
		
		\paragraph{} Examples: \\
\texttt{
=3 -> \$wall.....\# create a wall across the third row \\
=3\&=G -> \$door...\# create a door in the tile G3 \\
r -> \$open......\# open all doors on red tiles \\
}
\end{document}