コード例 #1
1
ファイル: Table.java プロジェクト: swimfrog/beercell
 public void undo() {
   if (moveHistory.size() > 0) {
     unmove((Move) moveHistory.lastElement());
     moveHistory.removeElement(moveHistory.lastElement());
   } else {
     controller.alert("You haven't made any moves yet!");
   }
 }
コード例 #2
0
ファイル: Table.java プロジェクト: swimfrog/beercell
 public void addToHistory(Move move) {
   // Add the move to the moveHistory so we can undo it later, if requested.
   moveHistory.addElement(move);
 }