public int CompareTo(MappingLevel other) { if (Type == LevelType.None) { return(other.Type == LevelType.None ? 0 : 1); } if (other.Type == LevelType.None) { return(-1); } var i = Type.CompareTo(other.Type); return(i == 0 ? Index.CompareTo(other.Index) : i); }
public int CompareTo(Level other) { var ltComp = type.CompareTo(other.type); return((ltComp == 0) ? MinMoves.CompareTo(other.MinMoves) : ltComp); }