public void DoClock(Context context, int hour) { if (hour < 9 || 17 <= hour) { context.ChangeState(NightState.GetInstance()); } else if (9 <= hour && hour < 12 || 13 <= hour && hour < 17) { context.ChangeState(DayState.GetInstance()); } }
public void DoClock(Context context, int hour) { if (hour < 9 || 17 <= hour) { context.ChangeState(NightState.GetInstance()); } else if (12 <= hour && hour < 13) { context.ChangeState(NoonState.GetInstance()); } }