Exemplo n.º 1
0
        //Later there will be a map of the town.

        public Town(TownGenerator townGen, string strSize, List <Building> lstReqBuildings)
        {
            name        = townGen.generateName();
            population  = townGen.generatePopulation(strSize);
            buildings   = new List <Building>(lstReqBuildings);
            information = townInfo();
        }
Exemplo n.º 2
0
        public frmTown()
        {
            InitializeComponent();

            List <Building> allBuildings = getBuildingInfo("..\\..\\Buildings.xml");

            townGen = new TownGenerator(allBuildings);


            //Fill in the listbox of building names with the building list
            foreach (Building building in allBuildings)
            {
                lbxAddBuilding.Items.Add(building.getName());
            }

            //It should already be set to sort but make sure
            lbxAddBuilding.Sorted = true;
        }