private void tryMove(Move move) { State state = problem.getCurrentState(); State next = move.doMove(state); problem.setCurrentState(next); }