public static int Compare(ISibala firstRoll, ISibala secondRoll) { if (IsSameType(firstRoll, secondRoll)) { if (IsSameColor(firstRoll)) { return(_samecolorlookup[firstRoll.Point] - _samecolorlookup[secondRoll.Point]); } if (firstRoll.OutputType == EnumOutputType.NPoints) { if (firstRoll.Point == secondRoll.Point) { return(firstRoll.MaxPoint - secondRoll.MaxPoint); } return(firstRoll.Point - secondRoll.Point); } return(0); } return(firstRoll.OutputType - secondRoll.OutputType); }
private static bool IsSameType(ISibala x, ISibala y) { return(x.OutputType == y.OutputType); }
private static bool IsSameColor(ISibala x) { return(x.OutputType == EnumOutputType.SameColor); }