Ejemplo n.º 1
0
 public Parameters(
     int wavesToRun,
     IDamageDispatcher damageDispatcher,
     HordeParameters hordeParameters,
     CityParameters cityParameters,
     Order[] orders,
     params SoldierParameters[] soldierParameters)
 {
     WavesToRun        = wavesToRun;
     DamageDispatcher  = damageDispatcher;
     HordeParameters   = hordeParameters;
     SoldierParameters = soldierParameters;
     CityParameters    = cityParameters;
     Orders            = orders;
 }
Ejemplo n.º 2
0
        private WaveResult RunWave(ZombieParameter[] zombieParameters, List <Order> orders, IDamageDispatcher damageDispatcher)
        {
            Wave currentWave = new Wave(zombieParameters, this.City, orders, damageDispatcher);

            this.City.OrderHandler.ExecuteOrders();

            if (this.City.Squad.IsAlive)
            {
                currentWave.Run();
            }
            return(currentWave.WaveResult);
        }
Ejemplo n.º 3
0
 public Wave(ZombieParameter[] zombieParameters, City city, List <Order> orders, IDamageDispatcher damageDispatcher)
 {
     this.Horde = new Horde(zombieParameters, city);
     this.City  = city;
     this.Orders.AddRange(orders);
     this.InitialResult    = this.CurrentTurnResult;
     this.DamageDispatcher = damageDispatcher;
     this.City.OrderHandler.BuyOrders(this.Orders.Where(order => order.TurnIndex == this.TurnResults.Count));
     this.WaveEngine = new WaveEngine(this);
 }