Skip to content

Instantly share code, notes, and snippets.

@cggonzal
Last active January 6, 2019 19:28
Show Gist options
  • Save cggonzal/7dd32c92b7881e42ef700b5cd7cd9dc4 to your computer and use it in GitHub Desktop.
Save cggonzal/7dd32c92b7881e42ef700b5cd7cd9dc4 to your computer and use it in GitHub Desktop.
while(not NQ.allQueensSafe()):
minAttacks = n + 1 # n + 1 is greater than any possibility of attacks so this is guaranteed to get minimized
pickedQueen = NQ.pickRandomQueen()
positions = NQ.availablePositions(pickedQueen)
minConflictPosition = (-1,-1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment