public bool SetRecord(string map, int difficulty, float time, int retries) { MapRecord currentRecord = records.GetRecord(map); MapRecord newRecord = new MapRecord(difficulty, time, retries); if (newRecord.CompareTo(currentRecord) > 0) { records.SetRecord(map, newRecord); UFUtils.Save(recordFilePath, records); return(true); } return(false); }