/** FIXME clients can undo each others moves. FIXME information about the principal is lost. */ public void undoLastMove() { if (moveStack.size() > 0) { Move m = (Move) moveStack.removeLast(); MoveStatus ms; synchronized (world) { ms = m.undoMove(world, Player.NOBODY); } if (ms != MoveStatus.MOVE_OK) { logger.log(Level.INFO, "Couldn't undo move!"); /* push it back on the stack to prevent further * out-of-order undos */ moveStack.add(m); } forwardMove(m, ms); } else { logger.log(Level.INFO, "No moves on stack."); } }