Exemplo n.º 1
0
        public void LoadGame()
        {
            LoadSettings();

            map     = new Map(loadedMapWidth, loadedMapHeight);
            manager = new UnitAndBuildingManager();
            foreach (string faction in factions)
            {
                manager.AddFaction(faction);
            }

            Load(UNITS_FILENAME);
            Load(BUIDLINGS_FILENAME);

            map.UpdateMap(manager);
        }
Exemplo n.º 2
0
        private void CreateUnitsAndBuildings()
        {
            foreach (string faction in factions)
            {
                manager.AddFaction(faction);

                if (faction != WIZARDS)
                {
                    AddUnits(random.Next(5, 10), faction);
                    AddBuildings(random.Next(10, 15), faction);
                }
                else
                {
                    AddUnits(random.Next(5, 10), faction);
                }
            }
        }