Example #1
0
 def test_swap_2x2(self):
     begin = [3, 2, 1, 4]
     state = solver16.State(begin)
     answer = solver16.brute_bfs(state)
     # print answer
     # print
     self.assertIsNotNone(answer)
Example #2
0
 def test_2x2(self):
     import itertools
     perms = map(list, list(itertools.permutations([1, 2, 3, 4])))
     for perm in perms:
         state = solver16.State(perm)
         # print state.arr
         answer = solver16.brute_bfs(state)
         # print answer.moves
         # print
         self.assertIsNotNone(answer)