Skip to content

Instantly share code, notes, and snippets.

View farebord's full-sized avatar

Facundo Rebord farebord

  • Argentina
View GitHub Profile
@farebord
farebord / queens.py
Created March 16, 2019 22:44
An 8 queens chess problem checker with Python.
# This is the first version I did.
# Its pretty much ugly and I can improve it a lot.
# It should work but I didn't test it.
valid = [
# a b c d e f g h
[ 0, 0, 0, 0, 0, 1, 0, 0 ], # 1
[ 1, 0, 0, 0, 0, 0, 0, 0 ], # 2
[ 0, 0, 0, 0, 1, 0, 0, 0 ], # 3
[ 0, 1, 0, 0, 0, 0, 0, 0 ], # 4