Slyke

For loops

Oct 23rd, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.39 KB | None | 0 0
  1.             if (undoIndex>=1) {
  2.                 int undoKeeper=undoIndex;
  3.                 undoIndex=0;
  4.                 for (int i=0;i<undoKeeper;i++) {
  5.                     memoryQueue.remove(memoryQueue.size() - 1); //If we change the past (undo some clicks), we can't go back to the future we came from. It becomes erased.
  6.                 }
  7.                 System.out.println("Cleared memory queue");
  8.             }
Advertisement
Add Comment
Please, Sign In to add comment