自己想用代码写下人生,可能会有些难,想的比较完美,把每个阶段主要的事情,印象深刻的记录下来。本人不会GIT,希望志同道合的程序猿能弄一个GIT,大家一起来完善这个程序。
public enum LifeState
{
出生 = 0,
幼儿园 = 1,
小学 = 2,
初中 = 3,
高中 = 4,
大学 = 5,
工作 = 6,
结婚 = 7,
生子 = 8,
升职 = 9,
退休 = 10,
死亡 = 11
};
public void Life(LifeState myState)
{
bool isDie = false;
switch (myState)
{
case LifeState.出生:
EatMilk();
break;
case LifeState.幼儿园:
LearnSimple();
break;
case LifeState.小学:
case LifeState.初中:
case LifeState.高中:
case LifeState.大学:
LearnKnowledge(myState);
break;
case LifeState.工作:
DoJob();
break;
}
}
private void DoJob()
{
//苦逼程序猿
}
private void LearnKnowledge(LifeState grade)
{
if (grade == LifeState.小学)
{
}
if (grade == LifeState.初中)
{
StudyHard();
}
if (grade == LifeState.高中)
{
StudyHard();
}
if (grade == LifeState.大学)
{
SkipClasses();//逃课
FallInLove();//恋爱
}
}
private void LearnSimple()
{
//ABCD,啊喔鹅
//无忧无虑,每天高高兴兴
}
private void EatMilk()
{
//吃奶阶段
}
未完待续。。。