solver-0h-h1/sources/main.py

27 lines
731 B
Python
Raw Normal View History

__author__ = 'gaugendre'
from grid import Grid
if __name__ == "__main__":
2015-01-01 22:48:08 +01:00
# Doesn't need any 'two rows are not the same'
array = [['B', ' ', ' ', ' '],
['B', 'B', ' ', ' '],
[' ', ' ', ' ', ' '],
[' ', 'B', ' ', 'B']]
grid = Grid(len(array), array)
print(grid)
grid.solve()
2015-01-01 22:48:08 +01:00
print(grid)
# This one does
array = [['B', 'B', ' ', ' ', ' ', ' '],
[' ', ' ', ' ', ' ', ' ', 'B'],
['B', 'B', ' ', 'B', ' ', ' '],
['B', ' ', ' ', ' ', ' ', ' '],
[' ', ' ', ' ', 'R', ' ', ' '],
[' ', ' ', 'R', ' ', ' ', ' ']]
grid = Grid(len(array), array)
print(grid)
grid.solve()
print(grid)