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
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()