System.out.println("Move " + move + " rejected " + "because " + ms.toString());
System.out.println("Queueing blocked move " + move);
        private synchronized void moveCommitted(Move move) {            MoveStatus ms;            if (!pendingMoves.isEmpty()) {                Move pendingMove = (Move)pendingMoves.getFirst();                if (move instanceof RejectedMove) {                    /* moves are rejected in order hence only the first can                     * match*/                    if (((RejectedMove)move).getAttemptedMove().equals(pendingMove)) {                        /* Move was one of ours so we add it to the list of                         * rejected moves and remove it from the list of pending                         * moves */                        rejectedMoves.add(move);                        pendingMoves.removeFirst();                        do {                            if (!undoMoves()) {                                break;                            }                            /* attempt to commit any moves which were previously                             * blocked */                            while (!approvedMoves.isEmpty()) {                                Move am = (Move)approvedMoves.getFirst();				if (am.doMove(world, am.getPrincipal()) !=					MoveStatus.MOVE_OK) {                                    break;                                }                                approvedMoves.removeFirst();                            }                        } while (!approvedMoves.isEmpty());                        return;                    }                } else if (move.equals(pendingMove)) {                    // move succeeded and we have already executed it                    pendingMoves.removeFirst();                    return;                }            }            /* move must be from another client */            if (!(move instanceof RejectedMove)) {		ms = move.doMove(world, move.getPrincipal());                if (ms != MoveStatus.MOVE_OK) {                    if (debug) {                        System.out.println("Move " + move + " rejected " +                            "because " + ms.toString());                    }                    /* move could not be committed because of                     * a pre-commited move yet to be rejected by the server */                    approvedMoves.addLast(move);                } else {                    forwardMove(move, ms);                }                return;            }        }