pendingMoves.removeLast();
synchronized (pendingMoves) { pendingMoves.removeLast(); }
        public synchronized void undoLastMove() {            if (moveReceiver != null) {                try {                    pendingMoves.removeLast();                } catch (NoSuchElementException e) {                    // ignore                }                moveReceiver.undoLastMove();            }        }