Introduction to OOP Chapter 6: The Eight Queens Puzzle: next previous audio real text

Advancing to Next Position

function queen.advance -> boolean

	if row < 8 then begin
		row := row + 1;
		return self.findSolution

		// cannot go further, move neighbor
	if not neighbor.advance then
		return false

	row := 1
	return self findSolution

Intro OOP, Chapter 6, Slide 9