So far I have a chessboard which is displayed fully, however, I want to modify it such that it has missing opposite diagonal corner pieces, I don't mind which corner.
This is my code so far:
\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{csquotes}
\usepackage[style=verbose-ibid,backend=bibtex]{biblatex}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all}
\bibliography{bibliography}
\usepackage{amsmath}
\begin{figure}[h!]
\caption{Chess board with opposite diagonal corner pieces missing.}
\label{fig:mutilated_chessboard}
\begin{center}
\begin{tikzpicture}[x=1cm]
\foreach \x in {0,...,7} \foreach \y in {0,...,7}
{
\pgfmathparse{mod(\x+\y,2) ? "black" : "white"}
\edef\colour{\pgfmathresult}
\path[fill=\colour] (\x,\y) rectangle ++ (1,1);
}
\draw (0,0)--(0,8)--(8,8)--(8,0)--cycle;
\end{tikzpicture}
\end{center}
\end{figure}
I was thinking of adding an if statement to only run the contents of the nested for loops if the x and y values were not both equal to 0 or both equal to 8. How should I do this?
\documentclassand the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem. – samcarter_is_at_topanswers.xyz Feb 06 '18 at 22:07