Skip to content

Instantly share code, notes, and snippets.

@joshrosso
Last active August 29, 2015 14:07
Show Gist options
  • Save joshrosso/0f8d43d4994f51c2f16d to your computer and use it in GitHub Desktop.
Save joshrosso/0f8d43d4994f51c2f16d to your computer and use it in GitHub Desktop.
func - PlaceQueen
Assume this function ensures location is valid
-> PlaceQueen[firstQueen](0,0)
-> PlaceQueen
-> PlaceQueen
-> PlaceQueen - SOLUTION FOUND
->PlaceQueen - No Valid Place Found
->PlaceQueen - No Valid Place Found
-> PlaceQueen[firstQueen](0,1)
-> PlaceQueen
-> PlaceQueen - No Valid Place Found
->PlaceQueen - No Valid Place Found
->PlaceQueen[firstQueen] (0,2)
->PlaceQueen
->PlaceQueen
->PlaceQueen - SOLTUION FOUND
->PlaceQueen - No Valid Place Found
->PlaceQueen - No Valid Place Found
->PlaceQueen[firstQueen] (0,3)
->PlaceQueen - No Valid Place Found
TERMINATE -> firstQueen has reached end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment