public void AddMash(long down, long up) { long total = down + up; Mash myMash = new Mash(); myMash.Set(down, up, total, count); mashes.Add(myMash); count++; totalTime += total; downTotal += down; upTotal += up; UpdateBests(total); }
public void AddMash(long start, long release, long next) { long down = release - start; long up = next - release; long total = next - start; Mash myMash = new Mash(down, up, total, count); mashes.Add(myMash); count++; totalTime += total; downTotal += down; upTotal += up; UpdateBests(total); }
private int CompareMash(Mash mashA, Mash mashB) { if (mashA == null) { if (mashB == null) { return(0); } else { return(-1); } } else { if (mashB == null) { return(1); } else { if (mashA.total > mashB.total) { return(1); } else if (mashA.total == mashB.total) { return(0); } else { return(-1); } } } }
private int Reorder(Mash mashA, Mash mashB) { if (mashA == null) { if (mashB == null) { return(0); } else { return(-1); } } else { if (mashB == null) { return(1); } else { if (mashA.sequence > mashB.sequence) { return(1); } else if (mashA.sequence == mashB.sequence) { return(0); } else { return(-1); } } } }