public OnlyWhenAttribute(string valueA, LogicMatch match, long valueB) { Matches = new List <LogicArgument> { new LogicArgument(valueA, match, valueB) }; Type = JudgeType.Stat; }
private static bool Compare(long actual, LogicMatch match, long expected) { return(match switch { LogicMatch.GTR => actual > expected, LogicMatch.GEQ => actual >= expected, LogicMatch.EQU => actual == expected, LogicMatch.LEQ => actual <= expected, LogicMatch.LSS => actual < expected, LogicMatch.NEQ => actual != expected, _ => true });