Logic for drawing the chessboard.