Esempio n. 1
0
        /// <summary>
        /// Обновление глобальной информации игры
        /// </summary>
        /// <param name="me"></param>
        /// <param name="world"></param>
        /// <param name="game"></param>
        /// <param name="move"></param>
        public static void Update(Player me, World world, Game game, Move move)
        {
            Me    = me;
            World = world;
            Game  = game;
            Move  = move;

            foreach (var newVehicle in world.NewVehicles)
            {
                Units.Add(newVehicle.Id, new VehicleWrapper(newVehicle));
            }

            foreach (var vehicleUpdate in World.VehicleUpdates)
            {
                if (vehicleUpdate.Durability > 0)
                {
                    Units[vehicleUpdate.Id].Update(vehicleUpdate);
                }
                else
                {
                    Units.Remove(vehicleUpdate.Id);
                }
            }

            MyUnits = Units.Values.Where(i => i.PlayerId == Me.Id).ToList();

            Tactic.UpdateFormations();
        }
Esempio n. 2
0
        /// <summary>
        /// ќсновной метод стратегии
        /// </summary>
        /// <param name="me"></param>
        /// <param name="world"></param>
        /// <param name="game"></param>
        /// <param name="move"></param>
        public void Move(Player me, World world, Game game, Move move)
        {
            Global.Update(me, world, game, move);

            Tactic.GroupRush();

            //if (world.TickIndex < 0.75 * world.TickCount && !Tactic.EnemyIsWeaker )
            // {
            //Hurricane(world, me);
            //}
            //else
            //{
            //    Rush(expand: true);
            //}

            //EvadeNuclearStrike(world, me);
            NuclearStrike();
            Global.ActionQueue.Process();
        }