public Root(InitData initData) { inst = this; partys = Party.Init(def.partys.Values.ToList()); taishou = new Taishou(initData.common.name, initData.common.age, initData.common.party); date = Date.Init(); departs = Depart.Init(def.departs.Keys); pops = Pop.Init(departs); departs.ForEach(x => x.InitObservableData(new StreamingContext())); chaoting = Chaoting.Init(def.chaoting); economy = Economy.Init(def.economy); processes = Process.Init(); //parties = Party.Init(); risks = Risk.Init(); }
private static List <Pop> InitDepartPop(Depart depart) { var pops = new List <Pop>(); foreach (var pop_init in depart.def.pop_init) { pops.Add(new Pop(depart.name, pop_init.name, pop_init.num)); } return(pops); }
public static void DaysInc() { Economy.DaysInc(); Depart.DaysInc(); Pop.DaysInc(); Chaoting.DaysInc(); Date.Inc(); Process.DaysInc(); Risk.DaysInc(); }