Skip to content

Instantly share code, notes, and snippets.

@Alescontrela
Last active May 10, 2018 17:50
Show Gist options
  • Save Alescontrela/81e16e9c438bcafde2cd8cee12194096 to your computer and use it in GitHub Desktop.
Save Alescontrela/81e16e9c438bcafde2cd8cee12194096 to your computer and use it in GitHub Desktop.
def initialize(board, n):
for key in ['queen','row','col','nwtose','swtone']:
board[key] = {}
for i in range(n):
board['queen'][i] = -1
board['row'][i] = 0
board['col'][i] = 0
for i in range(-(n-1),n):
board['nwtose'][i] = 0
for i in range(2*n-1):
board['swtone'][i] = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment