Пример #1
0
 def goal_test(self, state):
     "goal_test(state) - Is state a goal?"
     testBoard = TileBoard(self.size, False, state)
     if (testBoard.solved()):
         return True
     else:
         return False
Пример #2
0
 def goal_test(self, state):
     "goal_test(state) - Is state a goal?"
     #create a temporary board and determine if it's solved
     temporaryboard = TileBoard(self.puzzletype,force_state=state.state_tuple())
     return temporaryboard.solved()