private boolean applyPendingMoves() {
boolean movesApplied = false;
if (parent != null) {
movesApplied = parent.applyPendingMoves();
}
Move old = pendingMoves;
pendingMoves = pendingMoves.apply(this);
if (pendingMoves != old) {
movesApplied = true;
}
return movesApplied;