public static bool TimeSatisfies(DateTime time, PressedTimeAdj expectedTime) { switch (expectedTime) { case PressedTimeAdj.ODD: return(time.Hour % 2 == 1); case PressedTimeAdj.EVEN: return(time.Hour % 2 == 0); case PressedTimeAdj.MORNING: return(time.Hour < 12); case PressedTimeAdj.AFTERNOON: return(time.Hour >= 12); } return(false); }
public void RandomizeFrom(VariationPoolForRules variationsToUse) { colorAdj = variationsToUse.PopRandomColor(); timeAdj = variationsToUse.PopRandomPressTime(); }
public static string GetDescriptionFor(PressedTimeAdj time) { return(description [(int)time]); }