Introduction to OOP | Chapter 6: The Eight Queens Puzzle: | next | previous | audio | real | text |
function queen.advance -> boolean if row < 8 then begin row := row + 1; return self.findSolution end // cannot go further, move neighbor if not neighbor.advance then return false row := 1 return self findSolution end