public static Engine Build(SquareDiagonalMap map, ConfigurationLoader conf, TurnLogImpl log) { Random rnd = new(); Engine eng = new(map, conf, log); ServiceGatherResource gather = new(log); eng.OnPreTurn += gather.CollectorsGatherResources; eng.OnPreTurn += gather.BuildingsProduceResources; return(eng); //TODO finish all steps //Log.SetTurn(Turn); //foreach (var settlement in Settlements) //{ // // //if (Turn % _conf.ExpansionDelay == 0) // { // ExpandSettlement(settlement); // } // GrowPopulation(settlement); //} //TradeGoods(); //foreach (var settlement in Settlements) //{ // UpdatePrices(settlement); //} }
public Engine(SquareDiagonalMap map, IGameLog log) { Map = map; Turn = 0; Log = log; OnPreTurn = PreTurnLog; OnPostTurn = PostTurnLog; OnTurn = TurnLog; }
public Engine(SquareDiagonalMap map, ConfigurationLoader configuration, TurnLogImpl?log) { Map = map; Settlements = new(); Consts = configuration.Const; Lists = configuration.Lists; Turn = 0; Log = log; OnPreTurn = PreTurnLog; OnPostTurn = PostTurnLog; OnTurn = TurnLog; }