Skip to content
Browse files

removed redundant code.

  • Loading branch information...
1 parent 579ef03 commit 7dce1c24b0c60c445cff04a25fe58dc8fd438175 uberj committed Nov 18, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 nqueens.py
View
4 nqueens.py
@@ -45,9 +45,8 @@ def unmark( row, col, board ):
"""
def valid_move( row, col, board, n ):
col_val = check_col( row, col, board, n )
- row_val = check_row( row, col, board, n )
diags_val = check_diags( row, col, board, n )
- return not (col_val or row_val or diags_val)
+ return not (col_val or diags_val)
"""
@@ -114,5 +113,6 @@ def pb( board, n ):
uniq_solutions.append(solutions)
meta_solutions += gen_all_rr(s_board,n)
meta_solutions.append(solution)
+
print "There were %s unique solutions for a %s x %s board." % (len(uniq_solutions),n,n)

0 comments on commit 7dce1c2

Please sign in to comment.
Something went wrong with that request. Please try again.