Пример #1
0
        public Engine(int mapWidth, int mapHeight)
        {
            currentTick = 0;
            futureUpdates = new Dictionary<int, List<Unit>>();
            map = new EngineMap(this, mapWidth, mapHeight);
            unitTypes = new List<UnitType>();
            tileTypes = new List<TileType>();
            players = new List<Player>();
            units = new List<Unit>();
            unitGrid = new Unit[map.width, map.height];
            unitQuadtrees = new Dictionary<Player, Quadtree>();

            idCounter = 0;

            map.Initialize();
            List<Position> goldTiles = new List<Position>();
            List<Position> ironTiles = new List<Position>();
            List<Position> manaTiles = new List<Position>();
            ai1 = new AI(this, null, goldTiles, ironTiles, manaTiles);
            ai2 = new AI(this, null, goldTiles, ironTiles, manaTiles);
        }
Пример #2
0
        public Engine(int mapWidth, int mapHeight)
        {
            currentTick   = 0;
            futureUpdates = new Dictionary <int, List <Unit> >();
            map           = new EngineMap(this, mapWidth, mapHeight);
            unitTypes     = new List <UnitType>();
            tileTypes     = new List <TileType>();
            players       = new List <Player>();
            units         = new List <Unit>();
            unitGrid      = new Unit[map.width, map.height];
            unitQuadtrees = new Dictionary <Player, Quadtree>();

            idCounter = 0;

            map.Initialize();
            List <Position> goldTiles = new List <Position>();
            List <Position> ironTiles = new List <Position>();
            List <Position> manaTiles = new List <Position>();

            ai1 = new AI(this, null, goldTiles, ironTiles, manaTiles);
            ai2 = new AI(this, null, goldTiles, ironTiles, manaTiles);
        }