static public int CompareByTotalTime(CScoreEntry _X, CScoreEntry _Y) { if (_X == null) { if (_Y == null) { return(0); } else { return(-1); } } else { if (_Y == null || _X.TotalTime > _Y.TotalTime) { return(1); } else if (_X.TotalTime < _Y.TotalTime) { return(-1); } else { return(0); } } }
/* * OBSOLETE! * OBSOLETE! * OBSOLETE! */ #region STATIC ACCESS static public int CompareByScore(CScoreEntry _X, CScoreEntry _Y) { if (_X == null) { if (_Y == null) { return(0); } else { return(-1); } } else { if (_Y == null || _X.Score > _Y.Score) { return(1); } else if (_X.Score < _Y.Score) { return(-1); } else { return(0); } } }
static public int CompareByTimeAndScore(CScoreEntry _X, CScoreEntry _Y) { int result = CompareByTotalTime(_X, _Y); if (result == 0) { result = -CompareByScore(_X, _Y); } return(result); }