def result(self, state, action): "result(state, action)- apply action to state and return new state" #return the state of the board after the action command, #using the board's move command. temporaryboard = TileBoard(self.puzzletype,force_state=state.state_tuple()) return temporaryboard.move(action)
def result(self, state, action): "result(state, action)- apply action to state and return new state" actionBoard = TileBoard(self.size, False, state) newboard = actionBoard.move(action) return newboard.state_tuple()