Puzzle must have tiles and a final state.
Example:
SMALL_GAME_FINAL = (
'RB',
'BR'
)
BLOCKS = (
(('R', ' '), ('B', 'R')),
(('B', ' '), (' ', ' '))
)
sol = PuzzleSolver()
sol.solve(SMALL_GAME_FINAL, BLOCKS)
FINAL = (
'BRBRR',
'RBBRB',
'RBBRB',
'RRRBB',
'BBRBR',
)
BLOCKS = (
(('R', ' '), ('B', 'B')),
(('B', 'B'), ('R', ' ')),
(('R', 'B'), (' ', ' ')),
(('B', 'B'), (' ', ' ')),
(('B', 'R'), (' ', ' ')),
((' ', 'R'), ('R', 'B')),
(('R', 'R'), (' ', 'B')),
(('R', 'B'), (' ', ' ')),
(('B', 'R'), (' ', 'B')),
(('R', 'R'), (' ', ' '))
)
sol = PuzzleSolver()
sol.solve(FINAL, BLOCKS)
FINAL = (
'11111',
'11111',
'11111',
)
BLOCKS = (
(('1', '1', '1'), ),
(('1', '1'), ('1', '1')),
(('1', '1'), ('1', '1')),
(('1', ' ', ' '), ('1', '1', '1')),
)
sol = PuzzleSolver()
sol.solve(FINAL, BLOCKS)