2014-12-31 15:48:26 +01:00
|
|
|
__author__ = 'gaugendre'
|
2015-01-03 23:34:27 +01:00
|
|
|
# This file is used to test solving methods from the solver module.
|
2014-12-31 15:48:26 +01:00
|
|
|
|
2015-01-03 23:34:27 +01:00
|
|
|
from solver_0hh1 import Grid
|
2014-12-31 15:48:26 +01:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2015-01-01 22:48:08 +01:00
|
|
|
# Doesn't need any 'two rows are not the same'
|
2014-12-31 15:48:26 +01:00
|
|
|
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', ' ', ' ', ' ', ' '],
|
2015-01-02 19:51:31 +01:00
|
|
|
[' ', ' ', ' ', ' ', ' ', 'B'],
|
|
|
|
['B', 'B', ' ', 'B', ' ', ' '],
|
|
|
|
['B', ' ', ' ', ' ', ' ', ' '],
|
|
|
|
[' ', ' ', ' ', 'R', ' ', ' '],
|
|
|
|
[' ', ' ', 'R', ' ', ' ', ' ']]
|
2015-01-01 22:48:08 +01:00
|
|
|
grid = Grid(len(array), array)
|
|
|
|
print(grid)
|
|
|
|
grid.solve()
|
2014-12-31 15:48:26 +01:00
|
|
|
print(grid)
|