public override void WriteProgram(Work w) { if (w.TaskFinished) { w.SetState(new RestState()); w.WriteProgram(); } else { if (w.Hour < 21) { Console.WriteLine($"當前時間{w.Hour}點,加班囉,好厭世"); } else { w.SetState(new SleepingState()); w.WriteProgram(); } } }
public override void WriteProgram(Work w) { if (w.TaskFinished) { w.SetState(new ResetState());//如果任务完成,则转入下班状态 w.WriteProgram(); } else { if (w.Hour < 21) { Console.WriteLine("当前时间:{0}点,加班哦,疲累之极.", w.Hour); } else { w.SetState(new SleepingState()); w.WriteProgram(); } } }
public override void WriteProgram(Work w) { if (w.TaskFinished) { w.SetState(new ResetState()); w.WriteProgram(); } else { if (w.Hour < 21) { Console.WriteLine($"当前时间:{w.Hour}点 加班哦,疲惫至极"); } else { w.SetState(new SleepingState()); w.WriteProgram(); } } }
public override void WriteProgram(Work work) { if (work.TaskFinished) { work.SetState(new RestState()); work.WriteProgram(); } else { if (work.Hour < 21) { Console.WriteLine($"當前時間: {work.Hour}點 加班喔,疲勞至極"); } else { work.SetState(new SleepingState()); work.WriteProgram(); } } }
public override void WriteProgram(Work work) { if (work.TaskFinished) { work.SetState(new RestState()); work.WriteProgram(); } else { if (work.Hour < 21) { Console.WriteLine("当前时间:{0}点 加班哦,疲累至极!", work.Hour); } else { work.SetState(new SleepingState()); work.WriteProgram(); } } }
public override void WriteProgram(Work work) { if (work.Finish) { work.SetState(new RestState()); work.WriteProgram(); } else { if (work.Hour < 21) { System.Console.WriteLine($"当前时间:{work.Hour}点,继续加班"); } else { work.SetState(new SleepState()); work.WriteProgram(); } } }
public override void WriteProgram(Work w) { if (w.Finish) { w.SetState(new RestState()); w.WriteProgram(); } else { if (w.Hour < 21) { Console.WriteLine("当前时间:{0}点 加班哦,疲累之极",w.Hour); } else { w.SetState(new SleepingState()); w.WriteProgram(); } } }
public override void WriteProgram(Work w) { if (w.Finish) { w.SetState(new RestState()); w.WriteProgram(); } else { if (w.Hour < 21) { Console.WriteLine("当前时间:{0}点 加班哦,疲累之极", w.Hour); } else { w.SetState(new SleepingState()); w.WriteProgram(); } } }
public override void WriteProgram(Work w) { if (w.Hour < 17) { Console.WriteLine("当前时间:{0}点 下午状态还不错,继续努力",w.Hour); } else { w.SetState(new EveningState()); w.WriteProgram(); } }
public override void WriteProgram(Work w) { if (w.Hour < 12) { Console.WriteLine($"當前時間{w.Hour}點,上午工作,精神百倍"); } else { w.SetState(new NoonState()); w.WriteProgram(); } }
public override void WriteProgram(Work w) { if (w.Hour < 13) { Console.WriteLine($"當前時間{w.Hour}點,餓了,覺得想睡"); } else { w.SetState(new AfternoonState()); w.WriteProgram(); } }
public override void WriteProgram(Work w) { if (w.Hour < 17) { Console.WriteLine($"當前時間{w.Hour}點,下午精神不錯,繼續努力"); } else { w.SetState(new EveningState()); w.WriteProgram(); } }
public override void WriteProgram(Work work) { if (work.Hour < 12) { Console.WriteLine($"當前時間: {work.Hour}點 上午工作,精神百倍"); } else { work.SetState(new NoonState()); work.WriteProgram(); } }
public override void WriteProgram(Work w) { if (w.Hour < 13) { Console.WriteLine("当前时间:{0}点 饿了,午饭:犯困,午休。", w.Hour); } else { w.SetState(new AfternoonState()); w.WriteProgram(); } }
public override void WriteProgram(Work w) { if (w.Hour < 13) { Console.WriteLine("当前时间:{0}点,饿了,午饭:犯困,午休.", w.Hour); } else { w.SetState(new AfternoonState()); w.WriteProgram(); } }
public override void WriteProgram(Work w) { if (w.Hour < 17) { Console.WriteLine("当前时间:{0}点 下午状态还不错,继续努力", w.Hour); } else { w.SetState(new EveningState()); w.WriteProgram(); } }
public override void WriteProgram(Work w) { if (w.Hour < 13) { Console.WriteLine($"当前时间:{w.Hour}点 饿了,午饭,犯困,午休"); } else { w.SetState(new AfternoonState()); w.WriteProgram(); } }
public override void WriteProgram(Work work) { if (work.Hour < 13) { Console.WriteLine("当前时间:{0}点 饿了,午饭:犯困,午休。", work.Hour); } else { work.SetState(new AfternoonState()); work.WriteProgram(); } }
public override void WriteProgram(Work work) { if (work.Hour < 17) { System.Console.WriteLine($"当前时间:{work.Hour}点,有点困"); } else { work.SetState(new EveningState()); work.WriteProgram(); } }
public override void WriteProgram(Work work) { if (work.Hour < 13) { System.Console.WriteLine($"当前时间:{work.Hour}点,午休会"); } else { work.SetState(new AfternoonState()); work.WriteProgram(); } }
public override void WriteProgram(Work work) { if (work.Hour < 12) { System.Console.WriteLine($"当前时间:{work.Hour}点,开始工作"); } else { work.SetState(new NonnState()); work.WriteProgram(); } }
public override void WriteProgram(Work w) { if (w.Hour < 12) { Console.WriteLine("当前时间:{0}点 上午工作,精神百倍",w.Hour); } else { w.SetState(new NoonState()); w.WriteProgram(); } }
public override void WriteProgram(Work work) { if (work.Hour < 17) { Console.WriteLine($"當前時間: {work.Hour}點 下午狀態還不錯,繼續努力"); } else { work.SetState(new EveningState()); work.WriteProgram(); } }
public override void WriteProgram(Work work) { if (work.Hour < 13) { Console.WriteLine($"當前時間: {work.Hour}點 餓了午休吃飯睡覺"); } else { work.SetState(new AfternoonState()); work.WriteProgram(); } }
public override void WriteProgram(Work w) { if (w.Hour < 12) { Console.WriteLine("当前时间:{0}点 上午工作,精神百倍", w.Hour); } else { w.SetState(new NoonState()); w.WriteProgram(); } }