@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); } }
@Override public boolean isUndoable() { return isPermitted() && persistencer.isAvailable(player.getName(), true); }