moveScope.setUndoMove(undoMove);
move.doMove(scoreDirector);
processMove(moveScope);
undoMove.doMove(scoreDirector);
if (assertUndoMoveIsUncorrupted) {
GreedyFitSolverPhaseScope greedyFitSolverPhaseScope = moveScope.getGreedyFitStepScope()
.getGreedyFitSolverPhaseScope();
Score undoScore = greedyFitSolverPhaseScope.calculateScore();
Score lastCompletedStepScore = greedyFitSolverPhaseScope.getLastCompletedStepScope().getScore();
if (!undoScore.equals(lastCompletedStepScore)) {
// First assert that are probably no corrupted score rules.
greedyFitSolverPhaseScope.getSolverScope().getScoreDirector()
.assertWorkingScore(undoScore);
throw new IllegalStateException(
"The moveClass (" + move.getClass() + ")'s move (" + move
+ ") probably has a corrupted undoMove (" + undoMove + ")." +
" Or maybe there are corrupted score rules.\n"