To draw a chessboard

You can use the chessboard package.

\documentclass{article}
\usepackage{chessboard}
\usepackage{skak}
\begin{document}
\setchessboard{showmover=false}
\newgame
\chessboard
\end{document}

enter image description here

And you can personalize your chessboard as you want. For example (if I understand correctly what you want to achieve):

\documentclass{article}
\usepackage[LSBC3,T1]{fontenc}
\usepackage{chessboard}
\usepackage{skak}
\usepackage{color}
\begin{document}
\setboardfontencoding{LSBC3}
\setchessboard{showmover=false}
\newgame
\chessboard[
    coloremph,
    fieldmaskcolor=red,
    fieldcolor=red,
    emphareas={a1-a8,c1-c8,e1-e8,g1-g8},
    coloremph,
    fieldmaskcolor=white,
    fieldcolor=white,
    emphareas={b1-b8,d1-d8,f1-f8,h1-h8}]
\end{document}

enter image description here

or more strange configurations:

\documentclass{article}
\usepackage[LSBC3,T1]{fontenc}
\usepackage{chessboard}
\usepackage{skak}
\usepackage{color}
\begin{document}
\setboardfontencoding{LSBC3}
\setchessboard{showmover=false}
\newgame
\chessboard[
    coloremph,
    fieldmaskcolor=red,
    fieldcolor=red,
    emphareas={a8-b7,c3-c5,e4-e7,f7-g7,g1-h3},
    coloremph,
    fieldmaskcolor=white,
    fieldcolor=white,
    emphareas={a1-b6,c6-d8,c1-d2,d3-d5,e8-h8,e1-f3,f4-h6}]
\end{document}

enter image description here


With PSTricks

\documentclass[pstricks]{standalone}
\psset{linecolor=brown}
\begin{document}
\begin{pspicture}(8,8)
    \multips(0,0)(0,2){4}{%
        \multips(0,0)(2,0){4}{%
            \psframe*(1,1)\psframe*(1,1)(2,2)}}
\end{pspicture}
\end{document}

enter image description here

Algorithm

The following animation shows the algorithm used to generate the board.

enter image description here

Without PSTricks

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}[x=1cm]
\foreach \y in {0,2,...,6}{
    \foreach \x in {0,2,...,6}{
        \fill (\x,\y) rectangle (1+\x,1+\y) rectangle (2+\x,2+\y);}}
\end{tikzpicture}
\end{document}

As the output is visually identical, I think I don't need to re-show it again.


Since the question contains the text "house's color unconventional", I assumed you need control over the colors to be applied and over the size and number of rows/columns of the chessboard. The following allows you to do that; you can easily draw a conventional chessboard, but you can also easily produce unconventional patterns as requested.

\documentclass{article}
\usepackage[dvipsnames]{xcolor}
\usepackage{keyval}

\def\Side{\ChessSide}
\newcommand\ChessBoxA{%
  {\fboxsep=0pt\fbox{\color{\ChessColori}\rule{\Side}{\Side}}}}
\newcommand\ChessBoxB{%
  {\fboxsep=0pt\fbox{\color{\ChessColorii}\rule{\Side}{\Side}}}}

\makeatletter
\newcommand\Row[1]{%
  \par\nobreak\nointerlineskip\vskip-\fboxrule%
  \@tfor\@tempa:=#1 \do {\csname ChessBox\@tempa\endcsname\kern-\fboxrule}}
\define@key{chessB}{side}{\def\ChessSide{#1}}
\define@key{chessB}{colori}{\def\ChessColori{#1}}
\define@key{chessB}{colorii}{\def\ChessColorii{#1}}
\setkeys{chessB}{
  side=1.5em,
  colori=black!70,
  colorii=white}
\makeatother

\newcommand\Conventional[1][]{%
\begin{Chessboard}[#1]
\Row{B,A,B,A,B,A,B,A}
\Row{A,B,A,B,A,B,A.B}
\Row{B,A,B,A,B,A,B,A}
\Row{A,B,A,B,A,B,A.B}
\Row{B,A,B,A,B,A,B,A}
\Row{A,B,A,B,A,B,A.B}
\Row{B,A,B,A,B,A,B,A}
\Row{A,B,A,B,A,B,A.B}
\end{Chessboard}%
}

\newenvironment{Chessboard}[1][]
  {\setkeys{chessB}{#1}%
  \par\medskip\setlength\parindent{0pt}}
  {\par\medskip}

\begin{document}

\Conventional

\Conventional[side=10pt,colori=Bittersweet]

\begin{Chessboard}
\Row{B,A,B,A,A,B}
\Row{A,A,B,A,B,B}
\Row{B,A,B,A,B,B}
\Row{A,A,B,B,A,B}
\Row{B,A,B,A,B,B}
\Row{A,A,A,A,B,A}
\end{Chessboard}

\begin{Chessboard}[side=0.8em,colori=MidnightBlue,colorii=Dandelion]
\Row{A,A,B,B}
\Row{A,A,B,B}
\Row{B,B,A,A}
\Row{B,B,A,A}
\end{Chessboard}

\begin{Chessboard}[side=1.2cm,colori=Maroon,colorii=ForestGreen]
\Row{A,A,B,B,A}
\Row{A,B,B,B,A}
\Row{A,B,B,A,A}
\Row{B,B,A,A,B}
\Row{B,B,B,A,B}
\end{Chessboard}

\end{document}

enter image description here

In the example, a simple key=value mechanism allows to control the side of each square, as well as the two colors used to produce the pattern. The keys are side (default=1.5em), colori (default=black!70), and colorii (default=white).

\Conventional draws a conventional chessboard; using an optional argument you can pass the options to this conventional chessboard.

The Chessboard environment allows you to have different patterns; inside this environment you use the \Row command to specify each row; the mandatory argument is a comma separated list of characters "A" and "B" which correspond to the colors to be used in that row; for example, with the default settings,

\begin{Chessboard}
\Row{B,A,B,A,A,B}
\end{Chessboard}

produces

enter image description here

Tags:

Chess

Tables