\begin{figure}[p]\caption{{\em An object oriented solution to the N-queens problem}}
\xdeno{{\it queen}}{
.ds queens.pl
}
Each queen checks whether it occupies a
legal position with respect to its neighbor.
The last queen in the row does not have a neighbor
as is indicated by the constant [].
The expression row // max delivers row modulo max,
where max is the instance variable recording the maximum row number.
} \end{figure}