Last active
May 10, 2018 17:50
-
-
Save Alescontrela/81e16e9c438bcafde2cd8cee12194096 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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