Introduction to OOP: Chapter 5: A Case Study : Eight Queens [next] [previous] [audio] [real] [text]

Test or Advance, Rewritten First

function testOrAdvance : boolean;
	if neighbor.canAttack(row, column) then
		return self.next
	else
		return true;
end

function first
	if not neighbor.first then
		return false;
	row := 1
	return self.testOrAdvance
end
Intro OOP, Chapter 5, Slide 11