예제 #1
0
 @Override
 public void undo() {
   try {
     // Load backup file
     persistencer.undo(player.getName(), isPermitted());
     // Read backup file
     persistencer.read(gameState, player.getName());
   } catch (IOException e) {
     logger.log(Level.WARNING, "Could not undo turn", e);
   }
 }
예제 #2
0
 @Override
 public boolean isUndoable() {
   return isPermitted() && persistencer.isAvailable(player.getName(), true);
 }